* tests/scripts/misc/general3: Add more tests for SHELL/.SHELLFLAGS

This commit is contained in:
Paul Smith 2019-08-25 00:20:38 -04:00
parent a0c17b5af1
commit 39bf50b2da

View File

@ -90,25 +90,25 @@ foo bar');
# Test the fastpath / single quotes # Test the fastpath / single quotes
# Single quotes don't behave the same in Windows # Single quotes don't behave the same in Windows
if ($port_type ne 'W32') { if ($port_type ne 'W32') {
run_make_test(" run_make_test(q!
all: all:
\@echo 'foo\\ @echo 'foo\
bar' bar'
\@echo 'foo\\ @echo 'foo\
bar' bar'
\@echo 'foo\\ @echo 'foo\
bar' bar'
\@echo 'foo\\ @echo 'foo\
bar' bar'
\@echo 'foo \\ @echo 'foo \
bar' bar'
\@echo 'foo \\ @echo 'foo \
bar' bar'
\@echo 'foo \\ @echo 'foo \
bar' bar'
\@echo 'foo \\ @echo 'foo \
bar' bar'
", !,
'', 'foo\ '', 'foo\
bar bar
foo\ foo\
@ -232,25 +232,25 @@ foo bar
hi'); hi');
# Test the slow path / single quotes # Test the slow path / single quotes
run_make_test(" run_make_test(q!
all: all:
\@echo hi; echo 'foo\\ @echo hi; echo 'foo\
bar' bar'
\@echo hi; echo 'foo\\ @echo hi; echo 'foo\
bar' bar'
\@echo hi; echo 'foo\\ @echo hi; echo 'foo\
bar' bar'
\@echo hi; echo 'foo\\ @echo hi; echo 'foo\
bar' bar'
\@echo hi; echo 'foo \\ @echo hi; echo 'foo \
bar' bar'
\@echo hi; echo 'foo \\ @echo hi; echo 'foo \
bar' bar'
\@echo hi; echo 'foo \\ @echo hi; echo 'foo \
bar' bar'
\@echo hi; echo 'foo \\ @echo hi; echo 'foo \
bar' bar'
", !,
'', 'hi '', 'hi
foo\ foo\
bar bar
@ -315,4 +315,33 @@ foo bar');
run_make_test('x:;@-exit 1', '', "#MAKE#: [#MAKEFILE#;1: x] Error 1 (ignored)\n"); 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; 1;
### Local Variables:
### eval: (setq whitespace-action (delq 'auto-cleanup whitespace-action))
### End: