From 63a4414863eb69da7597a539102e020a2df8f590 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 29 Mar 2012 14:37:00 -0600 Subject: [PATCH] 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 files. --- collects/compiler/commands/test.rkt | 7 +++++-- collects/scribblings/raco/test.scrbl | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/collects/compiler/commands/test.rkt b/collects/compiler/commands/test.rkt index d0d6c33df6..082b028536 100644 --- a/collects/compiler/commands/test.rkt +++ b/collects/compiler/commands/test.rkt @@ -5,7 +5,7 @@ raco/command-name) (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 (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)) diff --git a/collects/scribblings/raco/test.scrbl b/collects/scribblings/raco/test.scrbl index 6934b5e32e..99e0a94cf6 100644 --- a/collects/scribblings/raco/test.scrbl +++ b/collects/scribblings/raco/test.scrbl @@ -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.} ]