rc.conf.5: Adjust the memimg documentation a bit.
[dragonfly.git] / bin / ed / test / ckscripts.sh
blob92bba6b9a124d28238adf3aaa7178d659b475458
1 #!/bin/sh -
2 # This script runs the .ed scripts generated by mkscripts.sh
3 # and compares their output against the .r files, which contain
4 # the correct output
6 # $FreeBSD: head/bin/ed/test/ckscripts.sh 50471 1999-08-27 23:15:48Z peter $
8 PATH="/bin:/usr/bin:/usr/local/bin/:."
9 ED=$1
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
14 for i in *.red; do
15 echo $i
16 if $i; then
17 echo "*** The script $i exited abnormally ***"
19 done >errs.o 2>&1
21 # Run the remainding scripts; they exit with zero status
22 for i in *.ed; do
23 # base=`expr $i : '\([^.]*\)'`
24 # base=`echo $i | sed 's/\..*//'`
25 base=`$ED - \!"echo $i" <<-EOF
26 s/\..*
27 EOF`
28 if $base.ed; then
29 if cmp -s $base.o $base.r; then :; else
30 echo "*** Output $base.o of script $i is incorrect ***"
32 else
33 echo "*** The script $i exited abnormally ***"
35 done >scripts.o 2>&1
37 grep -h '\*\*\*' errs.o scripts.o