run-tests: don't drop optional lines after a missing unconditional line
authorMatt Harbison <matt_harbison@yahoo.com>
Tue, 18 Jul 2017 00:57:11 -0400
changeset 33722 1fa6023240f4
parent 33721 eeed23508383
child 33723 4d1e79945c2e
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.
tests/run-tests.py
tests/test-run-tests.t
--- 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
   !