test-paths: fix up json output to match $TESTTMP on Windows
authorMatt Harbison <matt_harbison@yahoo.com>
Wed, 20 Jan 2016 22:10:17 -0500
changeset 28173 1ff28873830e
parent 28172 f2004e4908f3
child 28174 f16b84b1e40e
test-paths: fix up json output to match $TESTTMP on Windows Without this, the paths were in the form "C:\\Users\\Matt\\AppData...". The test runner wouldn't collapse it down to $TESTTMP, which uses single backslashes.
tests/test-paths.t
--- a/tests/test-paths.t	Wed Jan 20 21:56:37 2016 -0500
+++ b/tests/test-paths.t	Wed Jan 20 22:10:17 2016 -0500
@@ -59,24 +59,24 @@
 formatter output with paths:
 
   $ echo 'dupe:pushurl = https://example.com/dupe' >> .hg/hgrc
-  $ hg paths -Tjson
+  $ hg paths -Tjson | sed 's|\\\\|\\|g'
   [
    {
     "name": "dupe",
     "pushurl": "https://example.com/dupe",
-    "url": "$TESTTMP/b#tip"
+    "url": "$TESTTMP/b#tip" (glob)
    },
    {
     "name": "expand",
-    "url": "$TESTTMP/a/$SOMETHING/bar"
+    "url": "$TESTTMP/a/$SOMETHING/bar" (glob)
    }
   ]
-  $ hg paths -Tjson dupe
+  $ hg paths -Tjson dupe | sed 's|\\\\|\\|g'
   [
    {
     "name": "dupe",
     "pushurl": "https://example.com/dupe",
-    "url": "$TESTTMP/b#tip"
+    "url": "$TESTTMP/b#tip" (glob)
    }
   ]
   $ hg paths -Tjson -q unknown