diff options
Diffstat (limited to 'dmake/tests/misc-1')
-rwxr-xr-x | dmake/tests/misc-1 | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/dmake/tests/misc-1 b/dmake/tests/misc-1 new file mode 100755 index 000000000000..5b4f581afda4 --- /dev/null +++ b/dmake/tests/misc-1 @@ -0,0 +1,35 @@ +#!/bin/sh + +# 04.06.2005 Volker Quetschke +# Test for a bug that dmake complained about a continuation char followed +# by a newline. This could happen if \<nl> was used in an imported +# environment variable. +# This bug was <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=310107?> + +: ${DMAKEPROG:=dmake} +file1="mymakefile.mk" +tmpfiles="$file1" + +trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15 + +trap 'rm -rf $tmpfiles' 1 2 3 15 + +# Remember to quote variables in generated makefiles ( $ -> \$ ). +# Also quote line continuations ( \<nl> -> \\<nl> ). +cat > $file1 <<EOT +# Testing continuation char in recipes +SHELL*:=/bin/sh +SHELLFLAGS*:=-ce +.IMPORT : MYMACRO +all: + +echo "\$(MYMACRO)" + +EOT + +MYMACRO=`echo 'aa\\\\\naa'` ;export MYMACRO; ${DMAKEPROG} -r -f $file1 +result=$? + +test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles} +test $result -ne 0 && echo "Failure!" +exit $result + |