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