Deleted Added
full compact
Makefile.test (146856) Makefile.test (151442)
1# $FreeBSD: head/tools/regression/usr.bin/make/syntax/enl/Makefile 146856 2005-06-01 11:26:47Z harti $
1# $FreeBSD: head/tools/regression/usr.bin/make/syntax/enl/Makefile 151442 2005-10-18 07:20:14Z harti $
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
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 fail because the comment continues on the next lines leading
18# to an unassociated shell command.
19\
17# This should print ok because the second assignment to foo is actually
18# a continued comment.
19FOO=ok
20#\
21\
20#\
21\
22FOO=not ok
22test2:
23test2:
23 @echo ok
24 @echo "${FOO}"
24
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
25.endif
59.endif