diff options
Diffstat (limited to 'tests/scripts/targets/DELETE_ON_ERROR')
-rw-r--r-- | tests/scripts/targets/DELETE_ON_ERROR | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/scripts/targets/DELETE_ON_ERROR b/tests/scripts/targets/DELETE_ON_ERROR new file mode 100644 index 00000000..08f009fa --- /dev/null +++ b/tests/scripts/targets/DELETE_ON_ERROR @@ -0,0 +1,22 @@ +#! -*-perl-*- + +$description = "Test the behaviour of the .DELETE_ON_ERROR target."; + +$details = ""; + +run_make_test(' +.DELETE_ON_ERROR: +all: ; false > $@ +', + '', "false > all\n#MAKEFILE#:3: recipe for target 'all' failed\n#MAKE#: *** [all] Error 1\n#MAKE#: *** Deleting file 'all'", 512); + +run_make_test(' +.DELETE_ON_ERROR: +all: foo.x ; +%.x : %.q ; echo > $@ +%.q : ; false > $@ +', + '', "false > foo.q\n#MAKEFILE#:5: recipe for target 'foo.q' failed\n#MAKE#: *** [foo.q] Error 1\n#MAKE#: *** Deleting file 'foo.q'", 512); + +# This tells the test driver that the perl test script executed properly. +1; |