run-tests: handle empty tests
authortimeless <timeless@mozdev.org>
Tue, 05 Apr 2016 04:26:20 +0000
changeset 28812 f1de5a612a74
parent 28811 1a623585a658
child 28813 d77b790bd8d6
run-tests: handle empty tests
tests/run-tests.py
tests/test-run-tests.t
--- a/tests/run-tests.py	Tue Jan 12 09:30:57 2016 +0000
+++ b/tests/run-tests.py	Tue Apr 05 04:26:20 2016 +0000
@@ -1058,6 +1058,7 @@
         if os.getenv('MSYSTEM'):
             script.append(b'alias pwd="pwd -W"\n')
 
+        n = 0
         for n, l in enumerate(lines):
             if not l.endswith(b'\n'):
                 l += b'\n'
--- a/tests/test-run-tests.t	Tue Jan 12 09:30:57 2016 +0000
+++ b/tests/test-run-tests.t	Tue Apr 05 04:26:20 2016 +0000
@@ -42,6 +42,15 @@
   $ rm hg
 #endif
 
+an empty test
+=======================
+
+  $ touch test-empty.t
+  $ rt
+  .
+  # Ran 1 tests, 0 skipped, 0 warned, 0 failed.
+  $ rm test-empty.t
+
 a succesful test
 =======================