]> granicus.if.org Git - re2c/commitdiff
run_tests.sh: avoid non-portable sed feature
authorUlya Trofimovich <skvadrik@gmail.com>
Mon, 28 Jul 2014 15:07:52 +0000 (18:07 +0300)
committerUlya Trofimovich <skvadrik@gmail.com>
Mon, 28 Jul 2014 15:07:52 +0000 (18:07 +0300)
re2c/run_tests.sh.in

index d41d74675a6cc268b67934fb3c904b02f75455d0..10b8206a9e581f1795ca8bfc2c4ea1023e420ca4 100644 (file)
@@ -39,7 +39,7 @@ tests="$@"
 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' -e 's/(\([^)]\+\))/ \1/g'`
+       switches=`basename $x|sed -e 's/^[^.]*\.\(.*\)\.re$/-\1/g' -e 's/^[^-].*//g' -e 's/\([^ ]\)--/\1 --/g' -e 's/(\([^)]*\))/ \1/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'`