]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* tests/scripts/functions/wildcard: [SV 52018] Test dangling symlink.
authorPaul Smith <psmith@gnu.org>
Sat, 4 Aug 2018 21:35:10 +0000 (17:35 -0400)
committerPaul Smith <psmith@gnu.org>
Sat, 4 Aug 2018 21:35:10 +0000 (17:35 -0400)
tests/scripts/functions/wildcard

index ad96473de36de261825a5cdb8d1d22777bcc0f3b..3ada19532722a0c65d3c8878f778208f35ea3958 100644 (file)
@@ -100,10 +100,11 @@ unlink('xxx.yyy');
 run_make_test(q!exists: ; @echo file=$(wildcard xxx.yyy)!,
               '', "file=\n");
 
-# TEST #6: check for wildcards matching directories
-# See SV 53465
-
 if ($port_type ne 'W32' && eval { symlink("",""); 1 }) {
+
+    # TEST #6: check for wildcards matching directories
+    # See SV 53465
+
     my $dir = '__rdir';
     my $lnk = '__ldir';
     mkdir($dir, 0777);
@@ -113,6 +114,14 @@ if ($port_type ne 'W32' && eval { symlink("",""); 1 }) {
 
     unlink($lnk);
     rmdir($dir);
+
+    # Test for dangling symlinks
+
+    symlink($dir, $lnk);
+
+    run_make_test(qq!all: ; \@echo \$(wildcard $lnk)!, '', "$lnk");
+
+    unlink($lnk);
 }
 
 1;