Patchwork [3,of,6] test-debugextensions: sanitize JSON output for Windows

login
register
mail settings
Submitter Ryan McElroy
Date Oct. 2, 2015, 9:33 p.m.
Message ID <1f8208a7277e9c9772d7.1443821624@waste.org>
Download mbox | patch
Permalink /patch/10744/
State Accepted
Commit 1f8208a7277e9c9772d719f10e0df0daa2a83d9f
Headers show

Comments

Ryan McElroy - Oct. 2, 2015, 9:33 p.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1443749050 14400
#      Thu Oct 01 21:24:10 2015 -0400
# Node ID 1f8208a7277e9c9772d719f10e0df0daa2a83d9f
# Parent  703d331c44ac10c9b81a038b40126b13ed1bc5bd
test-debugextensions: sanitize JSON output for Windows

Windows is printing a double backslash, which isn't handled by (glob):

  --- c:/Users/Matt/Projects/hg/tests/test-debugextensions.t
  +++ c:/Users/Matt/Projects/hg/tests/test-debugextensions.t.err
  @@ -47,7 +47,7 @@
      {
       "buglink": "",
       "name": "color",
  -    "source": "*/hgext/color.pyc", (glob)
  +    "source": "c:\\Users\\Matt\\Projects\\hg\\hgext\\color.pyc",
       "testedwith": "internal"
      },
      {

Patch

diff --git a/tests/test-debugextensions.t b/tests/test-debugextensions.t
--- a/tests/test-debugextensions.t
+++ b/tests/test-debugextensions.t
@@ -42,7 +42,7 @@ 
     location: */hgext/rebase.pyc (glob)
     tested with: internal
 
-  $ hg debugextensions -Tjson
+  $ hg debugextensions -Tjson | sed 's|\\\\|/|g'
   [
    {
     "buglink": "",