mirror of
https://github.com/dwinkler1/np.git
synced 2026-05-23 21:53:31 -04:00
new automated tests
This commit is contained in:
parent
d90f82b2bb
commit
2a521eeabd
7 changed files with 162 additions and 23 deletions
29
tests/ed/test.R
Executable file
29
tests/ed/test.R
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env Rscript
|
||||
|
||||
packages <- c("arrow", "data.table", "fixest", "nvimcom")
|
||||
failed <- character(0)
|
||||
|
||||
for (pkg in packages) {
|
||||
ok <- tryCatch(
|
||||
{
|
||||
# nvimcom requires Neovim; skip loading but check it's installed
|
||||
if (pkg == "nvimcom") {
|
||||
requireNamespace(pkg, quietly = TRUE)
|
||||
} else {
|
||||
library(pkg, character.only = TRUE, quietly = TRUE)
|
||||
}
|
||||
TRUE
|
||||
},
|
||||
error = function(e) FALSE
|
||||
)
|
||||
if (!ok) {
|
||||
failed <- c(failed, pkg)
|
||||
}
|
||||
}
|
||||
|
||||
if (length(failed) > 0) {
|
||||
cat(sprintf("FAIL: %s\n", paste(failed, collapse = ", ")))
|
||||
quit(status = 1)
|
||||
}
|
||||
|
||||
cat("PASS: all packages loaded\n")
|
||||
Loading…
Add table
Add a link
Reference in a new issue