Patchwork [2,of,3,STABLE] tests: quote environment variable to extract wildcard on MinGW environment

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Nov. 10, 2013, 9:42 a.m.
Message ID <95012ec670d4e181b614.1384076521@juju>
Download mbox | patch
Permalink /patch/2893/
State Accepted
Commit 83347ff5013471cc644cc20c0231586b5b5b5896
Headers show

Comments

Katsunori FUJIWARA - Nov. 10, 2013, 9:42 a.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1384069704 -32400
#      Sun Nov 10 16:48:24 2013 +0900
# Branch stable
# Node ID 95012ec670d4e181b6141949cecffecdb8c68ca6
# Parent  3353f12dbeda172800010521aa136c9baa918692
tests: quote environment variable to extract wildcard on MinGW environment

On MinGW environment, the command line below in test script can't
extract wildcard "*" and remove target files correctly.

    $ rm $ENVVAR/foo/bar.*

To extract wildcard, environment variable should be quoted by double
quotation like below:

    $ rm "$ENVVAR"/foo/bar.*

This patch also omits "-f" of "rm" to know whether files are removed
or not by exit code of it.

Patch

diff --git a/tests/test-extension.t b/tests/test-extension.t
--- a/tests/test-extension.t
+++ b/tests/test-extension.t
@@ -230,7 +230,7 @@ 
   $TESTTMP/a
 
 #if no-py3k
-  $ rm -f $TESTTMP/extroot/foo.*
+  $ rm "$TESTTMP"/extroot/foo.*
   $ cat > $TESTTMP/extroot/foo.py <<EOF
   > # test relative import
   > buf = []