merge the formfield patch from ooo-build
[ooovba.git] / dmake / tests / misc-1
blob5b4f581afda4f5581da184efc497c7d53c8ba8b7
1 #!/bin/sh
3 # 04.06.2005 Volker Quetschke
4 # Test for a bug that dmake complained about a continuation char followed
5 # by a newline. This could happen if \<nl> was used in an imported
6 # environment variable.
7 # This bug was <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=310107?>
9 : ${DMAKEPROG:=dmake}
10 file1="mymakefile.mk"
11 tmpfiles="$file1"
13 trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
15 trap 'rm -rf $tmpfiles' 1 2 3 15
17 # Remember to quote variables in generated makefiles ( $ -> \$ ).
18 # Also quote line continuations ( \<nl> -> \\<nl> ).
19 cat > $file1 <<EOT
20 # Testing continuation char in recipes
21 SHELL*:=/bin/sh
22 SHELLFLAGS*:=-ce
23 .IMPORT : MYMACRO
24 all:
25 +echo "\$(MYMACRO)"
27 EOT
29 MYMACRO=`echo 'aa\\\\\naa'` ;export MYMACRO; ${DMAKEPROG} -r -f $file1
30 result=$?
32 test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
33 test $result -ne 0 && echo "Failure!"
34 exit $result