3 # 15.08.2006 Volker Quetschke
4 # Check that single letter macros with (, {, ), } and : are rejected.
12 tmpfiles
="$file1 $file2 $file3 $file4"
14 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
16 # Remove files from prior failed run
19 # Remember to quote variables in generated makefiles( $ -> \$ ).
20 # Testcase 1 - Warn about miising closing braket.
29 # Testcase 2 - warn about $)
38 # Testcase 3 - warn about $:
47 # Testcase 4 - don't warn
57 output1
=`eval ${DMAKEPROG} -r -f $file1 2>&1 `
59 output2
=`eval ${DMAKEPROG} -r -f $file2 2>&1 `
61 output3
=`eval ${DMAKEPROG} -r -f $file3 2>&1 `
63 output4
=`eval ${DMAKEPROG} -r -f $file4 2>&1 `
66 if echo $output1 |
grep -v 'Error: -- Syntax error'; then
67 echo "Test 1: Missing error: $output1"
70 if echo $output2 |
grep -v 'Error: -- Syntax error' ; then
71 echo "Test 2: Missing error: $output2"
74 if echo $output3 |
grep -v 'Error: -- Syntax error'; then
75 echo "Test 3: Missing error: $output3"
78 if test "$output4" != "XLA)YXX:Y"; then
79 echo "Test 2: Wrong result: $output4"
83 if test $result1 -ne 0 -a $result2 -ne 0 -a $result3 -ne 0 -a $result4 -eq 0; then
84 echo "Success - Cleaning up"