From: helly Date: Fri, 30 Dec 2005 18:28:00 +0000 (+0000) Subject: - Use diff for comparing and add .diff to ignore list X-Git-Tag: 0.13.6~543 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b58442b03b85bf5c8b1d7342989759637f17ba59;p=re2c - Use diff for comparing and add .diff to ignore list --- diff --git a/run_tests.sh.in b/run_tests.sh.in index df5aa192..37057af0 100644 --- a/run_tests.sh.in +++ b/run_tests.sh.in @@ -6,8 +6,9 @@ for x in @top_srcdir@/test/*.re; do switches=`basename $x|sed -e 's/^.*\.\([^.]*\)\..*$/-\1/g' -e 's/^[^-].*//'g` # don't use the -o flag, since it makes it harder to diff. outname=@builddir@/test/`basename ${x%.re}.temp` + difname=@builddir@/test/`basename ${x%.re}.diff` @builddir@/re2c $switches $x 2>&1 | sed -e "s,$x,`basename $x`,g" -e "s,/\* Generated by re2c .*\*/,/\* Generated by re2c \*/,g" > $outname - if cmp -s ${x%.re}.c $outname; then + if diff -u ${x%.re}.c $outname > $difname; then echo "Passed." rm $outname else @@ -15,6 +16,7 @@ for x in @top_srcdir@/test/*.re; do result=1 errcnt=$(($errcnt+1)) fi + test -f ${x%.re}.diff -a ! -s $difname && rm -f $difname done if test $result = 0; then echo "All tests passed successfully." diff --git a/test/.cvsignore b/test/.cvsignore index b498376a..a0206597 100644 --- a/test/.cvsignore +++ b/test/.cvsignore @@ -1,2 +1,3 @@ a.out *.temp +*.diff