summaryrefslogtreecommitdiff
path: root/tests/scripts
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2012-03-03 22:56:20 +0000
committerPaul Smith <psmith@gnu.org>2012-03-03 22:56:20 +0000
commit405c89ba1e33e013f7e582e28f969fc3f39b9b2c (patch)
tree55f781c6c18edf75f75ac95f54f9fec2e631996b /tests/scripts
parenta77c5c09100ef56940546b543dd1c515529ca4bb (diff)
downloadgunmake-405c89ba1e33e013f7e582e28f969fc3f39b9b2c.tar.gz
Ensure that .ONESHELL works with .SHELLFLAGS options containing whitespace.
See Savannah bug #35397.
Diffstat (limited to 'tests/scripts')
-rw-r--r--tests/scripts/targets/ONESHELL13
-rw-r--r--tests/scripts/variables/SHELL8
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/scripts/targets/ONESHELL b/tests/scripts/targets/ONESHELL
index 997423f..0660e92 100644
--- a/tests/scripts/targets/ONESHELL
+++ b/tests/scripts/targets/ONESHELL
@@ -17,6 +17,19 @@ all:
[ 0"$a" -eq "$$" ] || echo fail
');
+# Simple but use multi-word SHELLFLAGS
+
+run_make_test(q!
+.ONESHELL:
+.SHELLFLAGS = -e -c
+all:
+ a=$$$$
+ [ 0"$$a" -eq "$$$$" ] || echo fail
+!,
+ '', 'a=$$
+[ 0"$a" -eq "$$" ] || echo fail
+');
+
# Again, but this time with inner prefix chars
run_make_test(q!
diff --git a/tests/scripts/variables/SHELL b/tests/scripts/variables/SHELL
index 4416ce1..3d49349 100644
--- a/tests/scripts/variables/SHELL
+++ b/tests/scripts/variables/SHELL
@@ -70,6 +70,14 @@ all: ; \@$script
!,
'', $out);
+# Do it again but add spaces to SHELLFLAGS
+$flags = '-x -c';
+run_make_test(qq!
+.SHELLFLAGS = $flags
+all: ; \@$script
+!,
+ '', $out);
+
# We can't just use "false" because on different systems it provides a
# different exit code--once again Solaris: false exits with 255 not 1
$script = 'true; false; true';