Browse files

make `--run-if-absent' the default mode for `raco test'

This convention makes it easier to deal with a set
of ".rkt" files that implement tests, while a `test'
module implements a `main'-like split for some of the
  • Loading branch information...
1 parent 8af781e commit 07149da7007ba18c2ffa484d6c16ba9d088e79c0 @mflatt mflatt committed with J. Ian Johnson Mar 29, 2012
Showing with 9 additions and 3 deletions.
  1. +5 −2 collects/compiler/commands/test.rkt
  2. +4 −1 collects/scribblings/raco/test.scrbl
@@ -5,7 +5,7 @@
(define submodule 'test)
-(define run-anyways? #f)
+(define run-anyways? #t)
(define (do-test e [check-suffix? #f])
(match e
@@ -37,7 +37,10 @@
"Runs submodule <name> (defaults to `test')"
(set! submodule (string->symbol name))]
[("--run-if-absent" "-r")
- "Require base module if submodule is absent"
+ "Require module if submodule is absent (on by default)"
(set! run-anyways? #t)]
+ [("--no-run-if-absent" "-x")
+ "Require nothing if submodule is absent"
+ (set! run-anyways? #f)]
#:args file-or-directory
(for-each do-test file-or-directory))
@@ -21,5 +21,8 @@ The @exec{raco test} command accepts a few flags:
@item{@Flag{r} or @DFlag{run-if-absent}
--- Requires the top-level module of a file if the relevant submodule is not
- present.}
+ present. This is the default mode.}
+ @item{@Flag{x} or @DFlag{no-run-if-absent}
+ --- Ignores a file if the relevant submodule is not present.}

0 comments on commit 07149da

Please sign in to comment.