diff options
Diffstat (limited to 'tests/scripts/options')
-rw-r--r-- | tests/scripts/options/dash-C | 9 | ||||
-rw-r--r-- | tests/scripts/options/dash-k | 14 |
2 files changed, 18 insertions, 5 deletions
diff --git a/tests/scripts/options/dash-C b/tests/scripts/options/dash-C index 3f2b3a1..f31238f 100644 --- a/tests/scripts/options/dash-C +++ b/tests/scripts/options/dash-C @@ -33,6 +33,10 @@ chdir $workdir; $wpath = &get_this_pwd; chdir $pwd; +if (-f $example) { + $test_passed = 0; +} + # Create the answer to what should be produced by this Makefile $answer = "$make_name: Entering directory `$wpath'\n" . "$delete_command EXAMPLE_FILE\n" @@ -40,9 +44,4 @@ $answer = "$make_name: Entering directory `$wpath'\n" &compare_output($answer,&get_logfile(1)); -if (-f $example) -{ - $test_passed = 0; -} - 1; diff --git a/tests/scripts/options/dash-k b/tests/scripts/options/dash-k index fe5689e..d87a786 100644 --- a/tests/scripts/options/dash-k +++ b/tests/scripts/options/dash-k @@ -97,4 +97,18 @@ $make_name: Target `all' not remade because of errors.\n"; &compare_output($answer, &get_logfile(1)); +# TEST -- make sure we keep the error code if we can't create an included +# makefile. + +run_make_test('all: ; @echo hi +include ifile +ifile: no-such-file; @false +', + '-k', + "#MAKEFILE#:2: ifile: No such file or directory +#MAKE#: *** No rule to make target `no-such-file', needed by `ifile'. +#MAKE#: Failed to remake makefile `ifile'. +hi\n", + 512); + 1; |