1 1.1 christos # -*-perl-*- 2 1.1 christos 3 1.1 christos $description = "Run some negative tests (things that should fail)."; 4 1.1 christos 5 1.1 christos # TEST #0 6 1.1 christos # Check that non-terminated variable references are detected (and 7 1.1 christos # reported using the best filename/lineno info 8 1.1 christos run_make_test(' 9 1.1 christos foo = bar 10 1.1 christos x = $(foo 11 1.1 christos y = $x 12 1.1 christos 13 1.1 christos all: ; @echo $y 14 1.1 christos ', 15 1.1 christos '', '#MAKEFILE#:3: *** unterminated variable reference. Stop.', 16 1.1 christos 512); 17 1.1 christos 18 1.1 christos # TEST #1 19 1.1 christos # Bogus variable value passed on the command line. 20 1.1 christos run_make_test(undef, 21 1.1 christos 'x=\$\(other', 22 1.1 christos '#MAKEFILE#:4: *** unterminated variable reference. Stop.', 23 1.1 christos 512); 24 1.1 christos 25 1.1 christos # TEST #2 26 1.1 christos # Again, but this time while reading the makefile. 27 1.1 christos run_make_test(' 28 1.1 christos foo = bar 29 1.1 christos x = $(foo 30 1.1 christos y = $x 31 1.1 christos 32 1.1 christos z := $y 33 1.1 christos 34 1.1 christos all: ; @echo $y 35 1.1 christos ', 36 1.1 christos '', '#MAKEFILE#:3: *** unterminated variable reference. Stop.', 37 1.1 christos 512); 38 1.1 christos 39 1.1 christos # TEST #3 40 1.1 christos # Bogus variable value passed on the command line. 41 1.1 christos run_make_test(undef, 42 1.1 christos 'x=\$\(other', 43 1.1 christos '#MAKEFILE#:4: *** unterminated variable reference. Stop.', 44 1.1 christos 512); 45 1.1 christos 46 1.1 christos 1; 47