@@ -12,7 +12,7 @@ bash_unit - bash unit testing enterprise edition framework for professionals!
1212
1313== Synopsis
1414
15- *bash_unit* [-f tap] [-p <pattern>] [-r] [test_file]
15+ *bash_unit* [-f tap] [-p <pattern>] [-s <pattern>] [- r] [test_file]
1616
1717== Description
1818
@@ -36,6 +36,12 @@ _(by the way, the documentation you are reading is itself tested with bash-unit)
3636 You can specify several patterns by repeating this option
3737 for each pattern.
3838
39+ *-s* _pattern_::
40+ skip tests which name matches the given pattern.
41+ You can specify several patterns by repeating this option
42+ for each pattern.
43+ Tests will appear in *bash_unit* output as _pending_.
44+
3945*-r*::
4046 executes test cases in random order.
4147 Only affects the order within a test file (files are always
@@ -199,6 +205,39 @@ Running tests in tests/test_core.sh
199205Overall result: SUCCESS
200206```
201207
208+ You can combine the _-p_ option with _-s_ to skip some of the tests. This option accepts a pattern
209+ as parameter and mark as pending any test function which matches this pattern.
210+
211+ ```test
212+ ./bash_unit -p fail_fails -p assert -s no -s status tests/test_core.sh
213+ ```
214+
215+ ```output
216+ Running tests in tests/test_core.sh
217+ Running test_assert_equals_fails_when_not_equal ... PENDING
218+ Running test_assert_matches_fails_when_not_matching ... PENDING
219+ Running test_assert_no_diff_fails_when_diff ... PENDING
220+ Running test_assert_no_diff_succeeds_when_no_diff ... PENDING
221+ Running test_assert_not_equals_fails_when_equal ... PENDING
222+ Running test_assert_not_equals_succeeds_when_not_equal ... PENDING
223+ Running test_assert_not_matches_fails_when_matching ... PENDING
224+ Running test_assert_not_matches_succeed_when_not_matching ... PENDING
225+ Running test_assert_status_code_fails ... PENDING
226+ Running test_assert_status_code_succeeds ... PENDING
227+ Running test_assert_equals_succeed_when_equal ... SUCCESS
228+ Running test_assert_fails ... SUCCESS
229+ Running test_assert_fails_fails ... SUCCESS
230+ Running test_assert_fails_succeeds ... SUCCESS
231+ Running test_assert_matches_succeed_when_matching ... SUCCESS
232+ Running test_assert_shows_stderr_on_failure ... SUCCESS
233+ Running test_assert_shows_stdout_on_failure ... SUCCESS
234+ Running test_assert_succeeds ... SUCCESS
235+ Running test_assert_within_delta_fails ... SUCCESS
236+ Running test_assert_within_delta_succeeds ... SUCCESS
237+ Running test_fail_fails ... SUCCESS
238+ Overall result: SUCCESS
239+ ```
240+
202241*bash_unit* supports the http://testanything.org/[Test Anything Protocol] so you can ask for a tap formatted
203242output with the _-f_ option.
204243
0 commit comments