Merge with stable
authorChristian Ebert <blacktrash@gmx.net>
Tue, 02 Nov 2010 14:04:21 +0100
changeset 853 65ec857290ab
parent 851 211c681fd634 (current diff)
parent 852 fb1e8925292d (diff)
child 854 3450d7f7d1a3
Merge with stable
--- 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)