Update ooo320-m1
[ooovba.git] / dmake / tests / misc-14
blob6f71b373c2dfa5ed6f32e9351d354f1a45748ce1
1 #!/bin/sh
3 # 07.10.2006 Volker Quetschke
4 # Check if the line of the error is issued
5 # (issue 70027)
7 : ${DMAKEPROG:=dmake}
8 file1="mfile1.mk"
9 tmpfiles="$file1"
11 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
13 # Remove files from prior failed run
14 rm -rf $tmpfiles
16 # Remember to quote variables in generated makefiles ( $ -> \$ ).
17 # Also quote line continuations ( \<nl> -> \\<nl> ).
18 cat > $file1 <<EOT
19 SHELL*:=/bin/sh
20 SHELLFLAGS*:=-ce
22 all :
23 +echo allA
25 all :
26 +echo allB
27 EOT
29 output=`eval ${DMAKEPROG} -r -f $file1 2>&1`
30 result=$?
32 if echo "$output" | grep 'line .: Error: --' > /dev/null 2>&1 ; then
33 dummy=1
34 result=0
35 # OK
36 else
37 echo "Test 1: Wrong result: $output"
38 echo
39 result=1
42 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
43 test $result -ne 0 && echo "Failure!"
44 exit $result