summaryrefslogtreecommitdiff
path: root/tests/scripts/variables
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/variables')
-rw-r--r--tests/scripts/variables/SHELL22
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/scripts/variables/SHELL b/tests/scripts/variables/SHELL
index 0028d9f..7b7e7fe 100644
--- a/tests/scripts/variables/SHELL
+++ b/tests/scripts/variables/SHELL
@@ -58,27 +58,29 @@ one two:;@echo "$@: $(SHELL) $$SHELL"
# Test .SHELLFLAGS
-# We can't assume the value here: on Solaris for example, every line printed
+# We don't know the output here: on Solaris for example, every line printed
# by the shell in -x mode has a trailing space (!!)
-my $script = 'true';
-my $out = `/bin/sh -xc '$script' 2>&1`;
+my $script = 'true; true';
+my $flags = '-xc';
+my $out = `/bin/sh $flags '$script' 2>&1`;
run_make_test(qq!
-.SHELLFLAGS = -xc
+.SHELLFLAGS = $flags
all: ; \@$script
!,
'', $out);
# We can't just use "false" because on different systems it provides a
-# different exit code.
-
-my $script = 'r() { return 1; }; true; r; true';
-my $out = `/bin/sh -xec '$script' 2>&1`;
+# different exit code--once again Solaris: false exits with 255 not 1
+$script = 'true; false; true';
+$flags = '-xec';
+$out = `/bin/sh $flags '$script' 2>&1`;
+my $err = $? >> 8;
run_make_test(qq!
-.SHELLFLAGS = -xec
+.SHELLFLAGS = $flags
all: ; \@$script
!,
- '', "$out#MAKE#: *** [all] Error 1\n", 512);
+ '', "$out#MAKE#: *** [all] Error $err\n", 512);
1;