]> granicus.if.org Git - re2c/commitdiff
- Allow to test single files
authorhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 29 Apr 2007 15:32:47 +0000 (15:32 +0000)
committerhelly <helly@642ea486-5414-0410-9d7f-a0204ed87703>
Sun, 29 Apr 2007 15:32:47 +0000 (15:32 +0000)
re2c/run_tests.sh.in

index 2bf517eb70983d913ff7558a402bd2705b065fb2..eb97c118b401f9c1bb8a687f0acaf4987cf8e78d 100644 (file)
@@ -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'`