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

login
register
mail settings
Submitter Matt Harbison
Date Nov. 20, 2015, 10:23 p.m.
Message ID <0085c41cca6a2277621b.1448058204@waste.org>
Download mbox | patch
Permalink /patch/11551/
State Accepted
Headers show

Comments

Matt Harbison - Nov. 20, 2015, 10:23 p.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@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.
Pierre-Yves David - Nov. 21, 2015, 7:18 p.m.
On 11/20/2015 02:23 PM, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@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

Pushed to the clowncopter. Thanks.

Patch

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