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