Mercurial > hg
diff tests/test-run-tests.t @ 25388:6025cac3d02f
tests: add (?) flag for optional lines
When the test engine fails to match output on a line marked with (?),
it will simply continue to the next expected line and try again. This
allows simplifying tests that have either version-specific or
non-fixed behavior, for instance:
$ coin-flip
heads (?)
tails (?)
(There's no form of back-tracking attempted, so optional matches
should be specific.)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 31 May 2015 16:59:34 -0500 |
parents | bf84ab53c2fd |
children | 4d2b9b304ad0 |
line wrap: on
line diff
--- a/tests/test-run-tests.t Wed Apr 15 09:07:54 2015 -0700 +++ b/tests/test-run-tests.t Sun May 31 16:59:34 2015 -0500 @@ -21,7 +21,9 @@ > $ echo babar > babar > $ echo xyzzy + > never happens (?) > xyzzy + > nor this (?) > EOF $ $TESTDIR/run-tests.py --with-hg=`which hg` @@ -237,8 +239,8 @@ *SALT* 2 0 (glob) + echo xyzzy xyzzy - + echo *SALT* 4 0 (glob) - *SALT* 4 0 (glob) + + echo *SALT* 6 0 (glob) + *SALT* 6 0 (glob) . # Ran 2 tests, 0 skipped, 0 warned, 0 failed.