3 # 27.07.2007 Volker Quetschke
4 # Test the :i :1 macro extensions.
11 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
13 # Remove files from prior failed run
16 # Remember to quote variables in generated makefiles( $ -> \$ ).
24 MACRO:="/tmp/yyy.ext" "/tmp/a b/xxx.ext"
30 output1
=`eval ${DMAKEPROG} -r -f $file1`
32 if test "$output1" != "1:\"/tmp/yyy.ext\":"; then
33 echo "Subtest 1: Wrong result: $output1"
44 MACRO2:=/tmp/zzz.ext /tmp/aaa
51 output2
=`eval ${DMAKEPROG} -r -f $file1`
53 if test "$output2" != "1:/tmp/zzz.ext:"; then
54 echo "Subtest 2: Wrong result: $output2"
66 MACRO:="/tmp/yyy.ext" "/tmp/a b/xxx.ext"
73 output3
=`eval ${DMAKEPROG} -r -f $file1`
75 if test "$output3" != "i:\"/tmp/yyy.ext\" \"/tmp/a b/xxx.ext\":"; then
76 echo "Subtest 3: Wrong result: $output3"
88 MACRO:="/tmp/yyy.ext" "/tmp/a b/xxx.ext"
93 @echo 1n:\$(MACRO:1n):
97 output4
=`eval ${DMAKEPROG} -r -f $file1`
99 if test "$output4" != "1n:\"/tmp/yyy.ext\":"; then
100 echo "Subtest 4: Wrong result: $output4"
119 @echo i:\$(MACROi:i):
123 output5
=`eval ${DMAKEPROG} -r -f $file1`
125 if test "$output5" != "i:\"../expand.c\":"; then
126 echo "Subtest 5: Wrong result: $output5"
133 if test $result1 -eq 0 -a $result2 -eq 0 \
134 -a $result3 -eq 0 -a $result4 -eq 0 \
135 -a $result5 -eq 0 ; then
136 echo "Success - Cleaning up" && rm -f ${tmpfiles}