3 # 05.08.2007 Volker Quetschke
4 # Test the $(shell,expand ..) function macro.
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( $ -> \$ ).
17 # Test 1 - Test if it works.
19 # The printf on Solaris seems to need bash.
26 noop X\$(shell,expand +@printf "\x24(AAA)")Y\$(shell +@printf \\\\x24\\(AAA\\))Z
29 output1
=`eval ${DMAKEPROG} -r -f $file1`
31 if test "$output1" != "noop X123Y\$(AAA)Z"; then
32 echo "Subtest 1: Wrong result: $output1"
38 # Test 2 - Test if wrong arguments are catched.
40 # The printf on Solaris seems to need bash.
47 noop X\$(shell,XXX +@printf ABC\\\\x24\\(AAA\\))Y
51 output2
=`eval ${DMAKEPROG} -rf $file1 2>&1`
54 if echo $output2 |
grep 'Error: -- Unknown argument \[XXX\] to shell' > /dev
/null
2>&1 ; then
57 echo "Subtest 2: Wrong result: $output2"
64 if test $result1 -eq 0 -a $result2 -ne 0 ; then
65 echo "Success - Cleaning up" && rm -f ${tmpfiles}