changeset 33722:1fa6023240f4

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.
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 18 Jul 2017 00:57:11 -0400
parents eeed23508383
children 4d1e79945c2e
files tests/run-tests.py tests/test-run-tests.t
diffstat 2 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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
   !