diff --git a/docs/command-line.md b/docs/command-line.md
index c39122d6..3b8f1816 100644
--- a/docs/command-line.md
+++ b/docs/command-line.md
@@ -17,6 +17,9 @@ Click one of the followings links to take you straight to that option - or scrol
` -w, --warn`
` -d, --durations`
` -f, --input-file`
+ ` -c, --section`
+ ` -#, --filenames-as-tags`
+
@@ -217,6 +220,59 @@ In either case the actual value for the seed is printed as part of Catch's outpu
Prints the command line arguments to stdout
+
+
+## Specify the section to run
+
-s, --section <section name>+ +To limit exection to a specific section within a test case, use this option one or more times. +To narrow to sub-sections use multiple instances, where each subsequent instance specifies a deeper nesting level. + +E.g. if you have: + +
+TEST_CASE( "Test" ) { + SECTION( "sa" ) { + SECTION( "sb" ) { + /*...*/ + } + SECTION( "sc" ) { + /*...*/ + } + } + SECTION( "sd" ) { + /*...*/ + } +} ++ +Then you can run `sb` with: +
./MyExe Test -c sa -c sb+ +Or run just `sd` with: +
./MyExe Test -c sd+ +To run all of `sa`, including `sb` and `sc` use: +
./MyExe Test -c sa+ +There are some limitations of this feature to be aware of: +- Code outside of sections being skipped will still be executed - e.g. any set-up code in the TEST_CASE before the +start of the first section. +- At time of writing, wildcards are not supported in section names. +- If you specify a section without narrowing to a test case first then all test cases will be executed +(but only matching sections within them). + + + +## Filenames as tags +
-#, --filenames-as-tags+ +When this option is used then every test is given an additional tag which is formed of the unqualified +filename it is found in, with any extension stripped, prefixed with the `#` character. + +So, for example, tests within the file `~\Dev\MyProject\Ferrets.cpp` would be tagged `[#Ferrets]`. + + --- [Home](Readme.md)