@@ -65,19 +65,32 @@ If the amount of options is a little overwhelming for you, you can
6565write them down to a file and let `` byexample `` load them for you.
6666
6767The only convention that you need to follow is to write ** one** option
68- per line.
68+ per line. If the option receives one argument you can separate them by
69+ ` = ` or by a space but if there is more than one argument you will have
70+ to write the option and the arguments one by one in its own line.
6971
7072``` shell
7173$ cat test/ds/options_file
74+ # Options and their arguments are separated by a = or by a space
7275-l python
73- --options " +norm-ws"
76+ --options=+norm-ws
77+ < ...>
78+ # But if the option receives more than one argument, all of them
79+ # must be in its own line
80+ --skip
81+ test/ds/pkg/foo1.py
82+ test/ds/pkg/foo2.py
83+ < ...>
84+ # This wouldn't work:
85+ # --skip test/ds/pkg/foo1.py test/ds/pkg/foo2.py
86+ < ...>
7487```
7588
7689Then load it with `` @ `` and the file; you can use multiple files
7790and combine them with more options from the command line:
7891
7992``` shell
80- $ byexample @test/ds/options_file test/ds/python-tutorial.v2.md
93+ $ byexample @test/ds/options_file -- test/ds/python-tutorial.v2.md
8194< ...>
8295File test/ds/python-tutorial.v2.md, 4/4 test ran in < ...> seconds
8396[PASS] Pass: 4 Fail: 0 Skip: 0
@@ -86,20 +99,6 @@ File test/ds/python-tutorial.v2.md, 4/4 test ran in <...> seconds
8699> ** Note:** before ` 10.5.2 ` the options in the file required to be followed by an
87100> ` = ` like ` -l=python ` ; spaces were not allowed.
88101
89- Currently if the option receives more than one argument, you will still
90- have to list * all* the arguments one per line.
91-
92- ``` shell
93- $ cat test/ds/pkg/bopts2
94- --skip
95- test/ds/pkg/foo1.py
96- test/ds/pkg/foo2.py
97- --
98- test/ds/pkg/foo1.py
99- test/ds/pkg/foo2.py
100- test/ds/pkg/bar1.py
101- ```
102-
103102## File pattern expansions
104103
105104Consider the following:
@@ -152,14 +151,17 @@ test/ds/pkg/foo1.py
152151test/ds/pkg/foo2.py
153152<...>
154153
155- $ byexample -l python @test/ds/pkg/bopts2 | grep pkg | sort # byexample: +timeout=8
156- File test/ds/pkg/bar1.py, 1/1 test ran in <...> seconds
154+ $ byexample -l python @test/ds/pkg/bopts2 | grep pkg | wc -l # byexample: +timeout=8
155+ 1
157156
158157$ cat test/ds/pkg/bopts3
159158<...>skip=test/ds/pkg/foo1.py test/ds/pkg/foo2.py
160159<...>
161160
162- $ byexample -l python @test/ds/pkg/bopts2 | grep pkg | sort # byexample: +timeout=8
163- File test/ds/pkg/bar1.py, 1/1 test ran in <...> seconds
161+ $ byexample -l python @test/ds/pkg/bopts2 | grep pkg | wc -l # byexample: +timeout=8
162+ 1
163+
164+ $ byexample -l python @test/ds/pkg/bopts | grep pkg | wc -l # byexample: +timeout=8
165+ 1
164166
165167-->
0 commit comments