]>
git.cameronkatri.com Git - apple_cmds.git/blob - text_cmds/ed/test/ckscripts.sh
2 # This script runs the .ed scripts generated by mkscripts.sh
3 # and compares their output against the .r files, which contain
6 # $FreeBSD: src/bin/ed/test/ckscripts.sh,v 1.6 1999/08/27 23:14:18 peter Exp $
8 PATH
="/bin:/usr/bin:/usr/local/bin/:."
10 [ ! -x $ED ] && { echo "$ED: cannot execute"; exit 1; }
12 # Run the *.red scripts first, since these don't generate output;
13 # they exit with non-zero status
17 echo "*** The script $i exited abnormally ***"
21 # Run the remainding scripts; they exit with zero status
23 # base=`expr $i : '\([^.]*\)'`
24 # base=`echo $i | sed 's/\..*//'`
25 base
=`$ED - \!"echo $i" <<-EOF
29 if cmp -s $base.o
$base.r
; then :; else
30 echo "*** Output $base.o of script $i is incorrect ***"
33 echo "*** The script $i exited abnormally ***"
37 grep -h '\*\*\*' errs.o scripts.o