diff options
author | psmith <> | 2011-05-07 14:36:11 +0000 |
---|---|---|
committer | psmith <> | 2011-05-07 14:36:11 +0000 |
commit | 46bda9ab3c1b2fcfdb523177283801f5ace65d6b (patch) | |
tree | 6f1a2bae3db487327e227f221098de5533c05460 | |
parent | b80cc7c9ea2e76e4950a07cecb0151c0a9d7be3d (diff) | |
download | make-46bda9ab3c1b2fcfdb523177283801f5ace65d6b.tar.gz |
Inverted the boolean test from what I wanted it to be. Added a
regression test to make sure this continues to work.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | read.c | 2 | ||||
-rw-r--r-- | tests/ChangeLog | 5 | ||||
-rw-r--r-- | tests/scripts/functions/wildcard | 12 |
4 files changed, 22 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2011-05-07 Paul Smith <psmith@gnu.org> + + * read.c (parse_file_seq): Ensure existence checks use glob(). + 2011-05-07 Eli Zaretskii <eliz@gnu.org> * job.c (construct_command_argv_internal): Don't assume shellflags @@ -3111,7 +3111,7 @@ parse_file_seq (char **stringp, unsigned int size, int stopchar, #endif /* !NO_ARCHIVES */ /* glob() is expensive: don't call it unless we need to. */ - if (!(flags & PARSEFS_EXISTS) || strpbrk (name, "?*[") == NULL) + if (!(flags & PARSEFS_EXISTS) && strpbrk (name, "?*[") == NULL) { globme = 0; i = 1; diff --git a/tests/ChangeLog b/tests/ChangeLog index 86c67895..73b49fa3 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2011-05-07 Paul Smith <psmith@gnu.org> + + * scripts/functions/wildcard: Verify wildcard used to test for + file existence/non-existence. + 2011-05-02 Paul Smith <psmith@gnu.org> * scripts/functions/sort: Add a test for Savannah bug #33125. diff --git a/tests/scripts/functions/wildcard b/tests/scripts/functions/wildcard index 2841f5d5..bcd84ad7 100644 --- a/tests/scripts/functions/wildcard +++ b/tests/scripts/functions/wildcard @@ -88,4 +88,16 @@ all: ; @echo $(wildcard xz--y*.7) !, '', "\n"); +# TEST #5: wildcard used to verify file existence + +touch('xxx.yyy'); + +run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!, + '', "file=xxx.yyy\n"); + +unlink('xxx.yyy'); + +run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!, + '', "file=\n"); + 1; |