Imported Upstream version 4.0
[platform/upstream/make.git] / tests / scripts / functions / wildcard
index 2841f5d..bcd84ad 100644 (file)
@@ -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;