Add a test for escaped newline handling.
This commit is contained in:
parent
10c793046d
commit
54f37e8648
25
tools/regression/usr.bin/make/syntax/enl/Makefile
Normal file
25
tools/regression/usr.bin/make/syntax/enl/Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
# Test handling of escaped newlines.
|
||||
#
|
||||
|
||||
.ifmake test1
|
||||
|
||||
# This should succeed
|
||||
\
|
||||
\
|
||||
\
|
||||
test1:
|
||||
@echo ok
|
||||
|
||||
.elifmake test2
|
||||
|
||||
# This should fail because the comment continues on the next lines leading
|
||||
# to an unassociated shell command.
|
||||
\
|
||||
#\
|
||||
\
|
||||
test2:
|
||||
@echo ok
|
||||
|
||||
.endif
|
@ -0,0 +1 @@
|
||||
0
|
@ -0,0 +1 @@
|
||||
1
|
@ -0,0 +1,2 @@
|
||||
"Makefile", line 23: Unassociated shell command "@echo ok"
|
||||
make: fatal errors encountered -- cannot continue
|
@ -0,0 +1 @@
|
||||
ok
|
15
tools/regression/usr.bin/make/syntax/enl/test.t
Normal file
15
tools/regression/usr.bin/make/syntax/enl/test.t
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $FreeBSD$
|
||||
|
||||
cd `dirname $0`
|
||||
. ../../common.sh
|
||||
|
||||
# Description
|
||||
DESC="Test escaped new-lines handling."
|
||||
|
||||
# Run
|
||||
TEST_N=2
|
||||
TEST_2_TODO="bug in parser"
|
||||
|
||||
eval_cmd $*
|
Loading…
Reference in New Issue
Block a user