run-tests: don't drop optional lines after a missing unconditional line
The previous behavior was to bail out when hitting 'awol', so 'missing (?)' was
also dropped.
--- a/tests/run-tests.py Tue Jul 18 00:12:44 2017 -0400
+++ b/tests/run-tests.py Tue Jul 18 00:57:11 2017 -0400
@@ -1423,7 +1423,7 @@
# Don't append as optional line
continue
else:
- break
+ continue
postout.append(b' ' + el)
if lcmd:
--- a/tests/test-run-tests.t Tue Jul 18 00:12:44 2017 -0400
+++ b/tests/test-run-tests.t Tue Jul 18 00:57:11 2017 -0400
@@ -177,6 +177,13 @@
> b.r (re) (true !)
> missing (?)
> awol (true !)
+ >
+ > The "missing" line should stay, even though awol is dropped
+ > $ echo 'testing'
+ > test.ng (re) (true !)
+ > foo.ar (?)
+ > awol
+ > missing (?)
> EOF
$ rt test-failure.t
@@ -194,13 +201,22 @@
foobar*foo (glob) (false !)
te*ting (glob) (true !)
- @@ -13,6 +11,4 @@
+ foo.ar (re) (false !)
+ missing (?)
+ @@ -13,13 +11,10 @@
$ echo 'testing'
test.ng (re) (true !)
foo.ar (re) (false !)
- b.r (re) (true !)
missing (?)
- awol (true !)
+
+ The "missing" line should stay, even though awol is dropped
+ $ echo 'testing'
+ test.ng (re) (true !)
+ foo.ar (?)
+ - awol
+ missing (?)
ERROR: test-failure.t output changed
!