From: Ulya Fokanova Date: Fri, 10 Jan 2014 15:29:12 +0000 (+0300) Subject: Replaced 'echo' with 'printf' in generation of switches for test. X-Git-Tag: 0.13.7.1~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4146519668e328755b196af91f511c95c849d73b;p=re2c Replaced 'echo' with 'printf' in generation of switches for test. 'echo' doesn't distinguish between options and arguments, so in cases like 'echo "-e"' is outputs empty string. It results in dropping re2c's "-e" flag in tests with names like "test.e.re". --- diff --git a/re2c/run_tests.sh.in b/re2c/run_tests.sh.in index 4c38f7fb..6afeba15 100644 --- a/re2c/run_tests.sh.in +++ b/re2c/run_tests.sh.in @@ -40,9 +40,9 @@ fi; for x in $tests; do tstcnt=$(($tstcnt+1)) switches=`basename $x|sed -e 's/^[^.]*\.\(.*\)\.re$/-\1/g' -e 's/^[^-].*//g' -e 's/\([^ ]\)--/\1 --/g'` - genname=`echo $switches|sed -e 's,--.*$,,g' -e 's,^.[^o]*$,,g' -e 's,^[^ot]*t.*o.*$,,g' -e 's,^-[^o]*o\(.*\),@builddir@/test/\1,g'` - headers=`echo $switches|sed -e 's,--.*$,,g' -e 's,^.[^t]*$,,g' -e 's,^[^ot]*o.*t.*$,,g' -e 's,^-[^t]*t\(.*\),@builddir@/test/\1,g'` - switches=`echo $switches|sed -e 's,^-\([^ot-]*[ot]\)\(.*\)$,-\1@builddir@/test/\2,g'` + genname=`printf "%s" "$switches"|sed -e 's,--.*$,,g' -e 's,^.[^o]*$,,g' -e 's,^[^ot]*t.*o.*$,,g' -e 's,^-[^o]*o\(.*\),@builddir@/test/\1,g'` + headers=`printf "%s" "$switches"|sed -e 's,--.*$,,g' -e 's,^.[^t]*$,,g' -e 's,^[^ot]*o.*t.*$,,g' -e 's,^-[^t]*t\(.*\),@builddir@/test/\1,g'` + switches=`printf "%s" "$switches"|sed -e 's,^-\([^ot-]*[ot]\)\(.*\)$,-\1@builddir@/test/\2,g'` # don't use the -o flag, since it makes it harder to diff. echo $x: $switches outname=@builddir@/test/`basename ${x%.re}.c.temp`