- Enhance .POSIX to set -e when invoking shells, as demanded by a
[make.git] / tests / scripts / variables / negative
blob16a72b896ab961f89cc2321e73475f45cbe22d4c
1 #                                                                    -*-perl-*-
3 $description = "Run some negative tests (things that should fail).";
5 # TEST #0
6 # Check that non-terminated variable references are detected (and
7 # reported using the best filename/lineno info
8 run_make_test('
9 foo = bar
10 x = $(foo
11 y = $x
13 all: ; @echo $y
15               '', '#MAKEFILE#:3: *** unterminated variable reference.  Stop.',
16               512);
18 # TEST #1
19 # Bogus variable value passed on the command line.
20 run_make_test(undef,
21               'x=\$\(other',
22               '#MAKEFILE#:4: *** unterminated variable reference.  Stop.',
23               512);
25 # TEST #2
26 # Again, but this time while reading the makefile.
27 run_make_test('
28 foo = bar
29 x = $(foo
30 y = $x
32 z := $y
34 all: ; @echo $y
36               '', '#MAKEFILE#:3: *** unterminated variable reference.  Stop.',
37               512);
39 # TEST #3
40 # Bogus variable value passed on the command line.
41 run_make_test(undef,
42               'x=\$\(other',
43               '#MAKEFILE#:4: *** unterminated variable reference.  Stop.',
44               512);