xref: /freebsd/usr.bin/bmake/tests/syntax/enl/Makefile.test (revision bc96366c864c07ef352edb92017357917c75b36c)
1# $FreeBSD$
2#
3# Test handling of escaped newlines.
4#
5
6.ifmake test1
7
8# This should succeed
9\
10\
11\
12test1:
13	@echo ok
14
15.elifmake test2
16
17# This should print ok because the second assignment to foo is actually
18# a continued comment.
19FOO=ok
20#\
21\
22FOO=not ok
23test2:
24	@echo "${FOO}"
25
26.elifmake test3
27
28# Make sure an escaped newline inserts a space
29test3: a\
30b
31
32a:
33	@echo a
34
35b:
36	@echo b
37
38.elifmake test4
39
40# Make sure an escaped newline inserts exactly one space
41FOO=a\
42			      b
43
44test4:
45	@echo "${FOO}"
46
47.elifmake test5
48
49# Make sure each escaped newline inserts exactly one space
50FOO=a\
51\
52\
53\
54b
55
56test5:
57	@echo "${FOO}"
58
59.endif
60