From: helly Date: Sun, 29 Apr 2007 15:32:47 +0000 (+0000) Subject: - Allow to test single files X-Git-Tag: 0.13.6~172 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=701ffabe1a551e049a90877a503d090926a1f6b4;p=re2c - Allow to test single files --- diff --git a/re2c/run_tests.sh.in b/re2c/run_tests.sh.in index 2bf517eb..eb97c118 100644 --- a/re2c/run_tests.sh.in +++ b/re2c/run_tests.sh.in @@ -5,7 +5,12 @@ errcnt=0 tstcnt=0; #diff='diff -u -I "#line [0-9]*"' diff='diff -u' -for x in @top_srcdir@/test/*.re `find @top_srcdir@/lessons -name '*.re'|sort`; do +if test $# = 0; then +tests=`for i in test lessons; do find @top_srcdir@/$i -name '*.re'; done|sort` +else +tests="$@" +fi; +for x in $tests; do tstcnt=$(($tstcnt+1)) switches=`basename $x|sed -e 's/^[^.]*\.\(.*\)\.re$/-\1/g' -e 's/^[^-].*//g'` genname=`echo $switches|sed -e 's,^.[^o]*$,,g' -e 's,^[^ot]*t.*o.*$,,g' -e 's,^-[^o]*o\(.*\),@builddir@/test/\1,g'`