From 39bf50b2dae5a6aa2ab0ce803b81959cec84b03a Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 25 Aug 2019 00:20:38 -0400 Subject: [PATCH] * tests/scripts/misc/general3: Add more tests for SHELL/.SHELLFLAGS --- tests/scripts/misc/general3 | 69 ++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 20 deletions(-) diff --git a/tests/scripts/misc/general3 b/tests/scripts/misc/general3 index a4b11286..f8cded0d 100644 --- a/tests/scripts/misc/general3 +++ b/tests/scripts/misc/general3 @@ -90,25 +90,25 @@ foo bar'); # Test the fastpath / single quotes # Single quotes don't behave the same in Windows if ($port_type ne 'W32') { - run_make_test(" + run_make_test(q! all: - \@echo 'foo\\ + @echo 'foo\ bar' - \@echo 'foo\\ + @echo 'foo\ bar' - \@echo 'foo\\ + @echo 'foo\ bar' - \@echo 'foo\\ + @echo 'foo\ bar' - \@echo 'foo \\ + @echo 'foo \ bar' - \@echo 'foo \\ + @echo 'foo \ bar' - \@echo 'foo \\ + @echo 'foo \ bar' - \@echo 'foo \\ + @echo 'foo \ bar' -", +!, '', 'foo\ bar foo\ @@ -232,25 +232,25 @@ foo bar hi'); # Test the slow path / single quotes -run_make_test(" +run_make_test(q! all: - \@echo hi; echo 'foo\\ + @echo hi; echo 'foo\ bar' - \@echo hi; echo 'foo\\ + @echo hi; echo 'foo\ bar' - \@echo hi; echo 'foo\\ + @echo hi; echo 'foo\ bar' - \@echo hi; echo 'foo\\ + @echo hi; echo 'foo\ bar' - \@echo hi; echo 'foo \\ + @echo hi; echo 'foo \ bar' - \@echo hi; echo 'foo \\ + @echo hi; echo 'foo \ bar' - \@echo hi; echo 'foo \\ + @echo hi; echo 'foo \ bar' - \@echo hi; echo 'foo \\ + @echo hi; echo 'foo \ bar' -", +!, '', 'hi foo\ bar @@ -315,4 +315,33 @@ foo bar'); run_make_test('x:;@-exit 1', '', "#MAKE#: [#MAKEFILE#;1: x] Error 1 (ignored)\n"); +# Slow path with odd setups + +if ($port_type ne 'W32') { + run_make_test(q! + slow: SHELL := echo + slow: .SHELLFLAGS := hoho + slow:; @foo bar + !, + '', "hoho foo bar\n"); + + run_make_test(q! + slow: SHELL := echo hi + slow: .SHELLFLAGS := ho ho + slow:; @foo bar + !, + '', "hi ho ho foo bar\n"); + + run_make_test(q! + slow: SHELL := echo hi + slow: .SHELLFLAGS := 'ho;ho' + slow:; @foo bar + !, + '', "hi ho;ho foo bar\n"); +} + 1; + +### Local Variables: +### eval: (setq whitespace-action (delq 'auto-cleanup whitespace-action)) +### End: