scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

chktest.sh (355B)


      1 #!/bin/sh
      2 
      3 err=/tmp/$$.err
      4 chk=/tmp/$$.chk
      5 
      6 trap "tabs -8;rm -f a.out *.o $chk $err" 0 1 2 3 15
      7 tabs 40
      8 ulimit -c 0
      9 rm -f test.log
     10 
     11 while read i state
     12 do
     13 	echo $i >> test.log
     14 	printf "%s\t%s" $i $state
     15 
     16 	scc $CFLAGS -w -c $i 2> $err
     17 	echo "/^PATTERN/+;/^\./-w $chk" | ed -s $i
     18 	diff -c $chk $err >> test.log  && echo [OK] || echo [FAILED]
     19 	rm -f *.o
     20 done