tests/run-tests.py
branchstable
changeset 12895 53cfde2b3cf9
parent 12721 d4e21a9de8bc
child 12934 ea7ad8c3988a
--- a/tests/run-tests.py	Sat Oct 30 11:32:04 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)