diff tests/test-paths.t @ 35393:4441705b7111

tests: remove (glob) annotations that were only for '\' matches # skip-blame because this was mechanically rewritten the following script. I ran it on both *.t and *.py, but none of the *.py changes were proper. All *.t ones appear to be, and they run without addition failures on both Windows and Linux. import argparse import os import re ap = argparse.ArgumentParser() ap.add_argument('path', nargs='+') opts = ap.parse_args() globre = re.compile(r'^(.*) \(glob\)(.*)$') for p in opts.path: tmp = p + '.tmp' with open(p, 'rb') as src, open(tmp, 'wb') as dst: for line in src: m = globre.match(line) if not m or '$LOCALIP' in line or '*' in line: dst.write(line) continue if '?' in line[:-3] or ('?' in line[:-3] and line[-3:] != '(?)'): dst.write(line) continue dst.write(m.group(1) + m.group(2) + '\n') os.unlink(p) os.rename(tmp, p)
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 10 Dec 2017 22:50:57 -0500
parents f30e59703d98
children 83b0a5c0dfec
line wrap: on
line diff
--- a/tests/test-paths.t	Sun Dec 10 22:45:35 2017 -0500
+++ b/tests/test-paths.t	Sun Dec 10 22:50:57 2017 -0500
@@ -20,35 +20,35 @@
   $ echo 'dupe = ../b#tip' >> .hg/hgrc
   $ echo 'expand = $SOMETHING/bar' >> .hg/hgrc
   $ hg in dupe
-  comparing with $TESTTMP/b (glob)
+  comparing with $TESTTMP/b
   no changes found
   [1]
   $ cd ..
   $ hg -R a in dupe
-  comparing with $TESTTMP/b (glob)
+  comparing with $TESTTMP/b
   no changes found
   [1]
   $ cd a
   $ hg paths
-  dupe = $TESTTMP/b#tip (glob)
-  expand = $TESTTMP/a/$SOMETHING/bar (glob)
+  dupe = $TESTTMP/b#tip
+  expand = $TESTTMP/a/$SOMETHING/bar
   $ SOMETHING=foo hg paths
-  dupe = $TESTTMP/b#tip (glob)
-  expand = $TESTTMP/a/foo/bar (glob)
+  dupe = $TESTTMP/b#tip
+  expand = $TESTTMP/a/foo/bar
 #if msys
   $ SOMETHING=//foo hg paths
-  dupe = $TESTTMP/b#tip (glob)
+  dupe = $TESTTMP/b#tip
   expand = /foo/bar
 #else
   $ SOMETHING=/foo hg paths
-  dupe = $TESTTMP/b#tip (glob)
+  dupe = $TESTTMP/b#tip
   expand = /foo/bar
 #endif
   $ hg paths -q
   dupe
   expand
   $ hg paths dupe
-  $TESTTMP/b#tip (glob)
+  $TESTTMP/b#tip
   $ hg paths -q dupe
   $ hg paths unknown
   not found!
@@ -64,11 +64,11 @@
    {
     "name": "dupe",
     "pushurl": "https://example.com/dupe",
-    "url": "$TESTTMP/b#tip" (glob)
+    "url": "$TESTTMP/b#tip"
    },
    {
     "name": "expand",
-    "url": "$TESTTMP/a/$SOMETHING/bar" (glob)
+    "url": "$TESTTMP/a/$SOMETHING/bar"
    }
   ]
   $ hg paths -Tjson dupe | sed 's|\\\\|\\|g'
@@ -76,7 +76,7 @@
    {
     "name": "dupe",
     "pushurl": "https://example.com/dupe",
-    "url": "$TESTTMP/b#tip" (glob)
+    "url": "$TESTTMP/b#tip"
    }
   ]
   $ hg paths -Tjson -q unknown
@@ -89,21 +89,21 @@
  (behaves as a {name: path-string} dict by default)
 
   $ hg log -rnull -T '{peerurls}\n'
-  dupe=$TESTTMP/b#tip expand=$TESTTMP/a/$SOMETHING/bar (glob)
+  dupe=$TESTTMP/b#tip expand=$TESTTMP/a/$SOMETHING/bar
   $ hg log -rnull -T '{join(peerurls, "\n")}\n'
-  dupe=$TESTTMP/b#tip (glob)
-  expand=$TESTTMP/a/$SOMETHING/bar (glob)
+  dupe=$TESTTMP/b#tip
+  expand=$TESTTMP/a/$SOMETHING/bar
   $ hg log -rnull -T '{peerurls % "{name}: {url}\n"}'
-  dupe: $TESTTMP/b#tip (glob)
-  expand: $TESTTMP/a/$SOMETHING/bar (glob)
+  dupe: $TESTTMP/b#tip
+  expand: $TESTTMP/a/$SOMETHING/bar
   $ hg log -rnull -T '{get(peerurls, "dupe")}\n'
-  $TESTTMP/b#tip (glob)
+  $TESTTMP/b#tip
 
  (sub options can be populated by map/dot operation)
 
   $ hg log -rnull \
   > -T '{get(peerurls, "dupe") % "url: {url}\npushurl: {pushurl}\n"}'
-  url: $TESTTMP/b#tip (glob)
+  url: $TESTTMP/b#tip
   pushurl: https://example.com/dupe
   $ hg log -rnull -T '{peerurls.dupe.pushurl}\n'
   https://example.com/dupe
@@ -132,9 +132,9 @@
 zeroconf wraps ui.configitems(), which shouldn't crash at least:
 
   $ hg paths --config extensions.zeroconf=
-  dupe = $TESTTMP/b#tip (glob)
+  dupe = $TESTTMP/b#tip
   dupe:pushurl = https://example.com/dupe
-  expand = $TESTTMP/a/$SOMETHING/bar (glob)
+  expand = $TESTTMP/a/$SOMETHING/bar
   insecure = http://foo:***@example.com/
 
   $ cd ..