--- a/tests/run-tests.py Wed Oct 20 17:38:21 2010 -0500
+++ b/tests/run-tests.py Mon Nov 01 10:24:07 2010 +0100
@@ -604,7 +604,7 @@
raise
for s, r in replacements:
- output = output.replace(s, r)
+ output = re.sub(s, r, output)
return ret, splitnewlines(output)
def runone(options, test, skips, fails):
@@ -677,10 +677,10 @@
signal.alarm(options.timeout)
ret, out = runner(testpath, options, [
- (testtmp, '$TESTTMP'),
- (':%s' % options.port, ':$HGPORT'),
- (':%s' % (options.port + 1), ':$HGPORT1'),
- (':%s' % (options.port + 2), ':$HGPORT2'),
+ (re.escape(testtmp), '$TESTTMP'),
+ (r':%s\b' % options.port, ':$HGPORT'),
+ (r':%s\b' % (options.port + 1), ':$HGPORT1'),
+ (r':%s\b' % (options.port + 2), ':$HGPORT2'),
])
vlog("# Ret was:", ret)