--- a/tests/run-tests.py Wed Oct 27 11:15:31 2010 +0100
+++ b/tests/run-tests.py Tue Nov 02 14:04:21 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)