Skip to content

Commit

Permalink
Support optional devtools::load_all() in tttf.r
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Mar 5, 2024
1 parent a091591 commit 5ab9c21
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2024-03-05 Dirk Eddelbuettel <edd@debian.org>

* inst/examples/tttf.r: Support devtools::load_all() option

2024-03-02 Dirk Eddelbuettel <edd@debian.org>

* inst/examples/ciw.r: Several small tweaks
Expand Down
7 changes: 6 additions & 1 deletion inst/examples/tttf.r
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ suppressMessages({
})

## configuration for docopt
doc <- "Usage: tttf.r [-l LIB] [-s FILE] [-c] [-h] [-x] ARG
doc <- "Usage: tttf.r [-l LIB] [-s FILE] [-c] [-d] [-h] [-x] ARG
-l --library LIB load named library, LIB can be comma-separated
-s --source FILE source a named file
-d --loadall run `devtools::load_all()`
-c --ci set environment variable CI to TRUE [default: FALSE]
-h --help show this help text
-x --usage show help and short example usage"
Expand Down Expand Up @@ -54,4 +55,8 @@ if (opt$ci) {
Sys.setenv(CI="TRUE")
}

if (opt$loadall) {
suppressMessages(devtools::load_all())
}

testthat::test_file(path=opt$ARG)

0 comments on commit 5ab9c21

Please sign in to comment.