Patchwork tests: test-module-imports.t works on windows (with backslash path sep)

login
register
mail settings
Submitter Simon Heimberg
Date Feb. 8, 2014, 3:36 p.m.
Message ID <62daef5cf1fbd55783a1.1391873815@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/3520/
State Accepted
Commit ab71fb058ebf6e831a3cee2e078e015b9e1e40c6
Headers show

Comments

Simon Heimberg - Feb. 8, 2014, 3:36 p.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1390865632 -3600
# Node ID 62daef5cf1fbd55783a1d26f361e73930ca4fb0a
# Parent  b0638b5b004d575faeb363cd6028d356dc146bc2
tests: test-module-imports.t works on windows (with backslash path sep)

Transform the backslashes to slashes on windows, because they are eaten up by
the shell. (Similar as done in test-check-pyflakes.t.)

This test will not produce a traceback on windows anymore. But the test still
fails because the detected mixed imports differ.
Matt Mackall - Feb. 9, 2014, 10:22 p.m.
On Sat, 2014-02-08 at 16:36 +0100, Simon Heimberg wrote:
> # HG changeset patch
> # User Simon Heimberg <simohe@besonet.ch>
> # Date 1390865632 -3600
> # Node ID 62daef5cf1fbd55783a1d26f361e73930ca4fb0a
> # Parent  b0638b5b004d575faeb363cd6028d356dc146bc2
> tests: test-module-imports.t works on windows (with backslash path sep)

Queued for default, thanks.

Patch

diff -r b0638b5b004d -r 62daef5cf1fb tests/test-module-imports.t
--- a/tests/test-module-imports.t	Fre Feb 07 15:01:33 2014 -0800
+++ b/tests/test-module-imports.t	Die Jan 28 00:33:52 2014 +0100
@@ -22,7 +22,7 @@ 
 hidden by deduplication algorithm in the cycle detector, so fixing
 these may expose other cycles.
 
-  $ hg locate 'mercurial/**.py' | xargs python "$import_checker"
+  $ hg locate 'mercurial/**.py' | sed 's-\\-/-g' | xargs python "$import_checker"
   mercurial/dispatch.py mixed imports
      stdlib:    commands
      relative:  error, extensions, fancyopts, hg, hook, util