diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2012-08-26 19:24:46 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2012-08-26 19:24:46 +0400 |
commit | e46c9ea201b4bad8f4c6d19ee6dfb3537bc9facd (patch) | |
tree | 26ae9736985be2ef61032e7808b9fb0e2155c71f /tests/scripts/targets/POSIX | |
download | make.old-upstream.tar.gz |
Imported GNU Make 3.81upstream/3.82upstream
Diffstat (limited to 'tests/scripts/targets/POSIX')
-rw-r--r-- | tests/scripts/targets/POSIX | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/scripts/targets/POSIX b/tests/scripts/targets/POSIX new file mode 100644 index 0000000..9c30e18 --- /dev/null +++ b/tests/scripts/targets/POSIX @@ -0,0 +1,33 @@ +# -*-perl-*- + +$description = "Test the behaviour of the .PHONY target."; + +$details = ""; + + +# Ensure turning on .POSIX enables the -e flag for the shell +# We can't assume the exit value of "false" because on different systems it's +# different. + +my $script = 'false; true'; +my $flags = '-ec'; +my $out = `/bin/sh $flags '$script' 2>&1`; +my $err = $? >> 8; +run_make_test(qq! +.POSIX: +all: ; \@$script +!, + '', "#MAKE#: *** [all] Error $err\n", 512); + +# User settings must override .POSIX +$flags = '-xc'; +$out = `/bin/sh $flags '$script' 2>&1`; +run_make_test(qq! +.SHELLFLAGS = $flags +.POSIX: +all: ; \@$script +!, + '', $out); + +# This tells the test driver that the perl test script executed properly. +1; |