From 94e716f7950e67adcf629a3018d84417b3d8c414 Mon Sep 17 00:00:00 2001 From: philsquared Date: Tue, 4 Sep 2012 12:15:30 -0700 Subject: [PATCH] Updated test case option --- Command-line.md | 49 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/Command-line.md b/Command-line.md index 2feeebc..1a0750a 100644 --- a/Command-line.md +++ b/Command-line.md @@ -5,16 +5,16 @@ Note that options are described according to the following pattern: *<description>* -
-h, -?, --help
-
-n, --nothrow
-
-t, --test
-
-r, --reporter
-
-b, --break
-
-s, --success
-
-a, --abort
-
-l, --list
-
-o, --out
-
-n, --name
+ `-h, -?, --help`
+ `-n, --nothrow`
+ `-t, --test`
+ `-r, --reporter`
+ `-b, --break`
+ `-s, --success`
+ `-a, --abort`
+ `-l, --list`
+ `-o, --out`
+ `-n, --name`
## Usage @@ -31,13 +31,32 @@ Prints the command line arguments to stdout -t, --test <test-spec> [<test-spec> ...] -If you don't specify any tests on the command line then all registered tests are run. -Alternatively use -t or --test to specify which tests to run. This option takes 1-n arguments (you can also supply the option as many times as you like), each of which specify a test case name or a pattern that matches any number of test case names. In general these are referred to as test specs. Quotes are optional for test specs, unless there are spaces - in which case they are required. Some examples: +This option allows one ore more test specs to be supplied. Each spec either fully specifies a +test case or is a pattern containing wildcards to match a set of test cases. If this option +is not provided then all test cases, except those prefixed by `'./'` are run + +Specs must be enclosed in "quotes" if they contain spaces. If they do not contain spaces +the quotes are optional. + +Wildcards consist of the * character at the beginning, end, or both and can substitute for +any number of any characters (including none) + +If spec is prefixed with `exclude:` or the `~` character then the pattern matches an exclusion. +This means that tests matching the pattern are excluded from the set - even if a prior +inclusion spec included them. Subsequent inclusion specs will take precendence, however. +Inclusions and exclusions are evaluated in left-to-right order. + +Examples:
--t "example/first test"
--t example/stupid example/silly
--t example/group/*
+    -t thisTestOnly            Matches the test case called, 'thisTestOnly'
+    -t "this test only"        Matches the test case called, 'this test only'
+    -t these/*                 Matches all cases starting with 'these/'
+    -t exclude:notThis         Matches all tests except, 'notThis'
+    -t ~:notThis               Matches all tests except, 'notThis'
+    -t ~*private*              Matches all tests except those that contain 'private'
+    -t a/* ~a/b/* a/b/c        Matches all tests that start with 'a/', except those that
+                               start with 'a/b/', except 'a/b/c', which is included