[PATCH] run-tests: handle empty tests

timeless timeless at mozdev.org
Wed Apr 6 18:31:19 UTC 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1459830380 0
#      Tue Apr 05 04:26:20 2016 +0000
# Node ID 8675fcfc1c00ebea1133fba022ee6a2ed0130cd9
# Parent  ea86cdcd9b50bf38c6b9dd7bbaa04b9c8cc0aefb
run-tests: handle empty tests

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -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'
diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t
--- a/tests/test-run-tests.t
+++ b/tests/test-run-tests.t
@@ -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
 =======================
 


More information about the Mercurial-devel mailing list