update dev300-m58
[ooovba.git] / dmake / tests / recipes-4
blob378a2b4fa3724da5c2e6faa4f1d9d85879e2a9f0
1 #!/bin/sh
3 # 29.07.2006 Volker Quetschke
4 # Test builtin echo command.
5 # (issue 67589)
7 : ${DMAKEPROG:=dmake}
8 file1="mymakefile.mk"
9 tmpfiles="$file1"
11 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
13 trap 'rm -rf $tmpfiles' 1 2 3 15
15 # Remember to quote variables in generated makefiles( $ -> \$ ).
16 cat > $file1 <<EOT
17 # internal echo - This test might fail later if the internal echo ever
18 # learns to handle quotes.
19 SHELL:=/bin/sh
20 SHELLFLAGS:=-ce
22 all :
23 @echo -n "AB CD"
24 @+echo XY
26 EOT
28 output=`eval ${DMAKEPROG} -r -f $file1`
29 result=$?
30 if test "$output" != "\"AB CD\"XY"; then
31 echo "Wrong result: $output"
32 result=1
36 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
37 test $result -ne 0 && echo "Failure!"
38 exit $result