Debian Codegraph @

tests/scripts/misc/failure

raw
1 # -*-perl-*-
2
3 $description = "Test miscellaneous failures.";
4
5
6 # Test that the "did you mean TAB" message is printed properly
7
8 run_make_test(q!
9 $x.
10 !,
11 '', '#MAKEFILE#:2: *** missing separator. Stop.', 512);
12
13 run_make_test(q!
14 foo:
15 bar
16 !,
17 '', '#MAKEFILE#:3: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.', 512);
18
19 run_make_test(q!
20 .RECIPEPREFIX = :
21 foo:
22 bar
23 !,
24 '', '#MAKEFILE#:4: *** missing separator. Stop.', 512);
25
26 for my $kw ('eq', 'neq') {
27 run_make_test(qq!
28 if$kw(foo,bar)
29 \$(error ouch)
30 endif
31 !,
32 '', '#MAKEFILE#:2: *** missing separator (ifeq/ifneq must be followed by whitespace). Stop.', 512);
33
34 run_make_test(qq!
35 if$kw
36 \$(error ouch)
37 endif
38 !,
39 '', '#MAKEFILE#:2: *** invalid syntax in conditional. Stop.', 512);
40
41 run_make_test(qq!
42 if$kw blah
43 \$(error ouch)
44 endif
45 !,
46 '', '#MAKEFILE#:2: *** invalid syntax in conditional. Stop.', 512);
47 }
48
49 1;