diff options
Diffstat (limited to 'usr.bin/make/tests/syntax/enl/Makefile.test')
-rw-r--r-- | usr.bin/make/tests/syntax/enl/Makefile.test | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/usr.bin/make/tests/syntax/enl/Makefile.test b/usr.bin/make/tests/syntax/enl/Makefile.test new file mode 100644 index 0000000..a7c6955 --- /dev/null +++ b/usr.bin/make/tests/syntax/enl/Makefile.test @@ -0,0 +1,59 @@ +# $FreeBSD$ +# +# Test handling of escaped newlines. +# + +.ifmake test1 + +# This should succeed +\ +\ +\ +test1: + @echo ok + +.elifmake test2 + +# This should print ok because the second assignment to foo is actually +# a continued comment. +FOO=ok +#\ +\ +FOO=not ok +test2: + @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 |