* tests/scripts/features/errors: Check errors "running" a directory.
unlink($noexe);
}
+# Try failing by "running" a directory
+
+if ($ERR_exe_dir) {
+ mkdir('sd', 0775);
+
+ run_make_test(q!
+PATH := .
+all: ; sd
+!,
+ '', "sd\n#MAKE#: sd: $ERR_exe_dir\n#MAKE#: *** [#MAKEFILE#;3: all] Error 127", 512);
+
+ run_make_test(q!
+all: ; ./sd
+!,
+ '', "./sd\n#MAKE#: ./sd: $ERR_exe_dir\n#MAKE#: *** [#MAKEFILE#;2: all] Error 127", 512);
+
+ rmdir('sd');
+}
+
1;
$ERR_read_only_file = undef;
$ERR_unreadable_file = undef;
$ERR_noexe_file = undef;
+$ERR_exe_dir = undef;
if (open(my $F, '<', 'file.none')) {
print "Opened non-existent file! Skipping related tests.\n";
$ERR_nonexe_file = "$!";
}
+$_ = `./.`;
+if ($? == 0) {
+ print "Executed directory! Skipping related tests.\n";
+} else {
+ $ERR_exe_dir = "$!";
+}
+
chmod(0000, 'file.out');
if (open(my $F, '<', 'file.out')) {
print "Opened unreadable file! Skipping related tests.\n";