[PATCH 5 of 5] test-run-tests: conditionalize the $TESTDIR check for Windows separator

Matt Harbison matt_harbison at yahoo.com
Fri Nov 20 16:23:24 CST 2015


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1447710960 18000
#      Mon Nov 16 16:56:00 2015 -0500
# Node ID 0085c41cca6a2277621bfbe928b060a075572184
# Parent  15e7f0404d4e9a667ab00302c4daf62b2aa60768
test-run-tests: conditionalize the $TESTDIR check for Windows separator

The variable uniformly uses '\' separators, so the straight equality check with
'/' separating the last component fails.  It also doesn't like having the quote
appear in the middle of the string when testing.

diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t
--- a/tests/test-run-tests.t
+++ b/tests/test-run-tests.t
@@ -600,7 +600,11 @@
   > - \$TESTDIR, in which test-runtestdir.t is placed (expanded at runtime)
   > - \$RUNTESTDIR, in which run-tests.py is placed (expanded at runtime)
   > 
+  > #if windows
+  >   $ test "\$TESTDIR" = "$TESTTMP\anothertests"
+  > #else
   >   $ test "\$TESTDIR" = "$TESTTMP"/anothertests
+  > #endif
   >   $ test "\$RUNTESTDIR" = "$TESTDIR"
   >   $ head -n 3 "\$RUNTESTDIR"/../contrib/check-code.py
   >   #!/usr/bin/env python


More information about the Mercurial-devel mailing list