[PATCH 4 of 5] run-tests: allow command output to start with "> "
Danek Duvall
danek.duvall at oracle.com
Mon Aug 26 15:25:08 CDT 2013
# HG changeset patch
# User Danek Duvall <danek.duvall at oracle.com>
# Date 1377548528 25200
# Node ID e8d378497e82e22fe9c0cff4d2be56635d7057f3
# Parent e7f80cd7cea36a30b0011c6122b7b5e196107c51
run-tests: allow command output to start with "> "
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -738,6 +738,8 @@ def tsttest(test, wd, options, replaceme
if len(cmd) == 2 and cmd[0] == 'cd':
l = ' $ cd %s || exit 1\n' % cmd[1]
script.append(l[4:])
+ elif l.startswith(' \\> '): # output line starts with ">"
+ expected.setdefault(pos, []).append(l[3:])
elif l.startswith(' > '): # continuations
after.setdefault(prepos, []).append(l)
script.append(l[4:])
@@ -787,6 +789,8 @@ def tsttest(test, wd, options, replaceme
if lout:
if not lout.endswith('\n'):
lout += ' (no-eol)\n'
+ if lout.startswith('> '):
+ lout = '\\' + lout
# find the expected output at the current position
el = None
More information about the Mercurial-devel
mailing list