run-tests: stop automatically adding a (glob) for bundle backup lines
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 10 Dec 2017 19:21:48 -0500
changeset 35398 0432e54f4dbe
parent 35397 b963750b125f
child 35399 5feb782c7a95
run-tests: stop automatically adding a (glob) for bundle backup lines This is the first step to dropping the existing globs for '\' matches, now that it is handled automatically. Instead of just dropping it, this pattern is now used to convert to '/' paths, to reduce the amount of manual cleanup required when creating tests on Windows.
tests/run-tests.py
tests/test-run-tests.t
--- a/tests/run-tests.py	Thu Dec 07 17:18:29 2017 +0800
+++ b/tests/run-tests.py	Sun Dec 10 19:21:48 2017 -0500
@@ -973,7 +973,7 @@
             self._portmap(1),
             self._portmap(2),
             (br'(?m)^(saved backup bundle to .*\.hg)( \(glob\))?$',
-             br'\1 (glob)'),
+             br'\1'.replace(br'\\', br'/')),
             (br'([^0-9])%s' % re.escape(self._localip()), br'\1$LOCALIP'),
             (br'\bHG_TXNID=TXN:[a-f0-9]{40}\b', br'HG_TXNID=TXN:$ID$'),
             ]
--- a/tests/test-run-tests.t	Thu Dec 07 17:18:29 2017 +0800
+++ b/tests/test-run-tests.t	Sun Dec 10 19:21:48 2017 -0500
@@ -706,7 +706,7 @@
   $ echo "  $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t
   $ echo "  saved backup bundle to \$TESTTMP/foo.hg" >> test-failure.t
   $ echo "  $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t
-  $ echo "  saved backup bundle to \$TESTTMP/foo.hg (glob)" >> test-failure.t
+  $ echo "  saved backup bundle to \$TESTTMP\\foo.hg" >> test-failure.t
   $ echo "  $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t
   $ echo "  saved backup bundle to \$TESTTMP/*.hg (glob)" >> test-failure.t
   $ echo 'y' | rt -i 2>&1
@@ -720,15 +720,14 @@
    This is a noop statement so that
    this test is still more bytes than success.
    pad pad pad pad............................................................
-  @@ -9,7 +9,7 @@
-   pad pad pad pad............................................................
-   pad pad pad pad............................................................
+  @@ -11,6 +11,6 @@
+     $ echo 'saved backup bundle to $TESTTMP/foo.hg'
+     saved backup bundle to $TESTTMP/foo.hg
      $ echo 'saved backup bundle to $TESTTMP/foo.hg'
-  -  saved backup bundle to $TESTTMP/foo.hg
-  +  saved backup bundle to $TESTTMP/foo.hg* (glob)
+  -  saved backup bundle to $TESTTMP\foo.hg
+  +  saved backup bundle to $TESTTMP/foo.hg
      $ echo 'saved backup bundle to $TESTTMP/foo.hg'
-     saved backup bundle to $TESTTMP/foo.hg* (glob)
-     $ echo 'saved backup bundle to $TESTTMP/foo.hg'
+     saved backup bundle to $TESTTMP/*.hg (glob)
   Accept this change? [n] ..
   # Ran 2 tests, 0 skipped, 0 failed.
 
@@ -744,9 +743,9 @@
   pad pad pad pad............................................................
   pad pad pad pad............................................................
     $ echo 'saved backup bundle to $TESTTMP/foo.hg'
-    saved backup bundle to $TESTTMP/foo.hg (glob)<
+    saved backup bundle to $TESTTMP/foo.hg
     $ echo 'saved backup bundle to $TESTTMP/foo.hg'
-    saved backup bundle to $TESTTMP/foo.hg (glob)<
+    saved backup bundle to $TESTTMP/foo.hg
     $ echo 'saved backup bundle to $TESTTMP/foo.hg'
     saved backup bundle to $TESTTMP/*.hg (glob)<