Add more tests for escaped newline handling and fix a test that currently
should fail because of a bug in the parser (test 2).
This commit is contained in:
parent
8fa362e399
commit
2733c20457
@ -14,12 +14,46 @@ test1:
|
||||
|
||||
.elifmake test2
|
||||
|
||||
# This should fail because the comment continues on the next lines leading
|
||||
# to an unassociated shell command.
|
||||
\
|
||||
# This should print ok because the second assignment to foo is actually
|
||||
# a continued comment.
|
||||
FOO=ok
|
||||
#\
|
||||
\
|
||||
FOO=not ok
|
||||
test2:
|
||||
@echo ok
|
||||
@echo "${FOO}"
|
||||
|
||||
.elifmake test3
|
||||
|
||||
# Make sure an escaped newline inserts a space
|
||||
test3: a\
|
||||
b
|
||||
|
||||
a:
|
||||
@echo a
|
||||
|
||||
b:
|
||||
@echo b
|
||||
|
||||
.elifmake test4
|
||||
|
||||
# Make sure an escaped newline inserts exactly one space
|
||||
FOO=a\
|
||||
b
|
||||
|
||||
test4:
|
||||
@echo "${FOO}"
|
||||
|
||||
.elifmake test5
|
||||
|
||||
# Make sure each escaped newline inserts exactly one space
|
||||
FOO=a\
|
||||
\
|
||||
\
|
||||
\
|
||||
b
|
||||
|
||||
test5:
|
||||
@echo "${FOO}"
|
||||
|
||||
.endif
|
||||
|
@ -1 +1 @@
|
||||
1
|
||||
0
|
||||
|
@ -0,0 +1 @@
|
||||
0
|
@ -0,0 +1 @@
|
||||
0
|
@ -0,0 +1 @@
|
||||
0
|
@ -1,2 +0,0 @@
|
||||
"Makefile", line 23: Unassociated shell command "@echo ok"
|
||||
make: fatal errors encountered -- cannot continue
|
@ -0,0 +1 @@
|
||||
ok
|
@ -0,0 +1,2 @@
|
||||
a
|
||||
b
|
@ -0,0 +1 @@
|
||||
a b
|
@ -0,0 +1 @@
|
||||
a b
|
@ -9,7 +9,7 @@ cd `dirname $0`
|
||||
DESC="Test escaped new-lines handling."
|
||||
|
||||
# Run
|
||||
TEST_N=2
|
||||
TEST_N=5
|
||||
TEST_2_TODO="bug in parser"
|
||||
|
||||
eval_cmd $*
|
||||
|
Loading…
x
Reference in New Issue
Block a user