From 4146519668e328755b196af91f511c95c849d73b Mon Sep 17 00:00:00 2001 From: Ulya Fokanova Date: Fri, 10 Jan 2014 18:29:12 +0300 Subject: [PATCH] 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". --- re2c/run_tests.sh.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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` -- 2.40.0