Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / byacc / dist / test / run_test.sh
blob598fce6eacb90fb9ed6b4f798c4051489395cd85
1 #!/bin/sh
2 # Id: run_test.sh,v 1.3 2008/08/25 20:22:14 tom Exp
4 echo '** '`date`
5 for i in *.y
6 do
7 case $i in
8 test*)
9 echo "?? ignored $i"
12 root=`basename $i .y`
13 ROOT="test-$root"
14 ../yacc -v -d -p ${root}_ -b $ROOT $i
15 for type in .output .tab.c .tab.h
17 REF=${root}${type}
18 CMP=${ROOT}${type}
19 if test ! -f $CMP ; then
20 echo "...not found $CMP"
21 continue
23 sed -e s/$CMP/$REF/ \
24 -e /YYPATCH/d \
25 < $CMP >temp$$ \
26 && mv temp$$ $CMP
27 if ( cmp -s $REF $CMP )
28 then
29 echo "...ok $REF"
30 rm -f $CMP
31 else
32 echo "...diff $REF"
34 done
36 esac
37 done