Patchwork [2,of,2] test-paths: fix up json output to match $TESTTMP on Windows

login
register
mail settings
Submitter Matt Harbison
Date Feb. 19, 2016, 4:20 a.m.
Message ID <2ba1fa66191b648f3f50.1455855629@Envy>
Download mbox | patch
Permalink /patch/13262/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

Matt Harbison - Feb. 19, 2016, 4:20 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1453345817 18000
#      Wed Jan 20 22:10:17 2016 -0500
# Node ID 2ba1fa66191b648f3f50de902751096db685de6e
# Parent  d50b77bee718346ca920fd3ab452f8cc1e1be49c
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.

Patch

diff --git a/tests/test-paths.t b/tests/test-paths.t
--- a/tests/test-paths.t
+++ b/tests/test-paths.t
@@ -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