Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/onqtam/doctest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEgor Suvorov <egor.suvorov@gmail.com>2022-03-05 15:36:58 +0300
committerGitHub <noreply@github.com>2022-03-05 15:36:58 +0300
commitbef19659da2b7ca49feec44fd0756072470836a0 (patch)
tree0be335e24c95479a3aa5d02fb82271d7a31a5b1b /doc
parent3e1011c6957570a5eba37c0e42d4202045bef1d9 (diff)
Allow escaping backslash with backslash in filters (#614) (#616)
* Allow escaping backslash with backslash in filters (#614) * Add test * Strengthen test conditions Co-authored-by: Salvage <29021710+Saalvage@users.noreply.github.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/markdown/commandline.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/markdown/commandline.md b/doc/markdown/commandline.md
index cec19712..15a55198 100644
--- a/doc/markdown/commandline.md
+++ b/doc/markdown/commandline.md
@@ -9,7 +9,9 @@
**Bool options** - they expect ```1```/```yes```/```on```/```true``` or ```0```/```no```/```off```/```false``` after the ```=``` sign - but they can also be used like flags and the ```=value``` part can be skipped - then ```true``` is assumed.
**Filters** - a comma-separated list of wildcards for matching values - where ```*``` means "match any sequence" and ```?``` means "match any one character".
-To pass patterns with intervals use ```""``` like this: ```--test-case="*no sound*,vaguely named test number ?"```. Patterns that contain a comma can be escaped with ```\``` (example: ```--test-case=this\,test\,has\,commas```).
+To pass patterns with intervals use ```""``` like this: ```--test-case="*no sound*,vaguely named test number ?"```. Patterns that contain a comma or a backslash can be escaped with ```\``` (example: ```--test-case=this\,test\,has\,commas\,and\,a\\\,backslash\,followed\,by\,a\,comma```).
+If a backslash is followed by neither ```\``` nor ```,``` it's left as is, e.g. ```--test-case="Test that \ works correctly"```.
+Be careful: your shell may use ```\``` for escaping as well, so `\` may actually get consumed by the shell instead of doctest.
All the options can also be set with code (defaults/overrides) if the user [**supplies the ```main()``` function**](main.md).