[PATCH 2 of 3] run-tests: end doctest block when seeing a non-command

Idan Kamara idankk86 at gmail.com
Thu Oct 13 10:56:10 CDT 2011


# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1318521277 -7200
# Node ID fad3c0d87935c633d21c63f0615449a93e2521fe
# Parent  53e6242edf135ede8a8743e2d9a3c3d83960513e
run-tests: end doctest block when seeing a non-command

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -525,7 +525,7 @@
     inblock = False
     for l in lines:
         if inblock:
-            if l.startswith('  $ '):
+            if l.startswith('  $ ') or not l.startswith('  '):
                 inblock = False
                 yield '  > EOF\n'
                 yield l


More information about the Mercurial-devel mailing list