[PATCH V3] test-paths.t: enable for Windows using #if

Adrian Buehlmann adrian at cadifra.com
Sun Jun 3 12:47:44 CDT 2012


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1338744945 -7200
# Node ID 1922baa1772092d0c6b48813685715007296c7cf
# Parent  58c19c676afa56d4862949d90f87df2c62bcb4af
test-paths.t: enable for Windows using #if

If the no-msys exit at the beginning is removed, the test fails on Windows with
MSYS with:

  --- C:\Users\adi\hgrepos\hg-main\tests\test-paths.t
  +++ C:\Users\adi\hgrepos\hg-main\tests\test-paths.t.err
  @@ -24,7 +24,7 @@
     expand = $TESTTMP/a/foo/bar (glob)
     $ SOMETHING=/foo hg paths
     dupe = $TESTTMP/b (glob)
  -  expand = /foo/bar
  +  expand = c:/MinGW/msys/1.0/foo/bar
     $ hg paths -q
     dupe
     expand

diff --git a/tests/test-paths.t b/tests/test-paths.t
--- a/tests/test-paths.t
+++ b/tests/test-paths.t
@@ -1,5 +1,3 @@
-  $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate /foo/bar as if it was a real file path
-
   $ hg init a
   $ hg clone a b
   updating to branch default
@@ -24,9 +22,15 @@
   $ SOMETHING=foo hg paths
   dupe = $TESTTMP/b (glob)
   expand = $TESTTMP/a/foo/bar (glob)
+#if msys
+  $ SOMETHING=//foo hg paths
+  dupe = $TESTTMP/b (glob)
+  expand = /foo/bar
+#else
   $ SOMETHING=/foo hg paths
   dupe = $TESTTMP/b (glob)
   expand = /foo/bar
+#endif
   $ hg paths -q
   dupe
   expand


More information about the Mercurial-devel mailing list