Skip to content

Commit

Permalink
Revert default for 'effects' in tt.r to FALSE matching tinytest
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Oct 3, 2023
1 parent eb992d7 commit be826c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
2023-10-03 Dirk Eddelbuettel <edd@debian.org>

* inst/examples/tt.r: Switch the default value for 'effects' from
FALSE to TRUE which, while a breaking change, is the better default.

2023-09-25 Dirk Eddelbuettel <edd@debian.org>

* inst/examples/installRub.r: Also allow 'package@universe'
* inst/examples/installRub.r: Also allow 'package@universe' format

2023-09-20 Dirk Eddelbuettel <edd@debian.org>

Expand Down
6 changes: 3 additions & 3 deletions inst/examples/tt.r
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# tinytest wrapper
#
# Copyright (C) 2019 - 2022 Dirk Eddelbuettel
# Copyright (C) 2019 - 2023 Dirk Eddelbuettel
#
# Released under GPL (>= 2)

Expand All @@ -25,7 +25,7 @@ doc <- "Usage: tt.r [-h] [-x] [-a] [-b] [-d] [-f] [-n NCPUS] [-p] [-s] [-z] [ARG
-n --ncpus NCPUS use 'ncpus' in parallel [default: getOption]
-p --package use package mode [default: FALSE]
-s --silent use silent and do not print result [default: FALSE]
-z --effects suppress side effects [default: FALSE]
-z --effects show side effects [default: FALSE]
-h --help show this help text
-x --usage show help and short example usage"
opt <- docopt(doc) # docopt parsing
Expand All @@ -47,7 +47,7 @@ See https://dirk.eddelbuettel.com/code/littler.html for more information.\n")
q("no")
}

sideeffects <- if (opt$effects) FALSE else TRUE # by default, use side effects
sideeffects <- if (opt$effects) TRUE else FALSE # by default, do not show side effects

if (opt$ncpus == "getOption") {
opt$ncpus <- getOption("Ncpus", 1L)
Expand Down

0 comments on commit be826c9

Please sign in to comment.