📄 difftest.in
字号:
#!@KSH@ -p## Check test results against official output from the src tree## $Id: difftest.in,v 1.3 1999/11/16 15:24:30 joel Exp $## XXX: do not run size.exe with this; it asks questions we don't answer# how to do arith in bash# i=$((i * 2))# b=$((b + 1))# progname=`basename $0`progname=${0##*/} # fast basename hack for ksh, bashUSAGE=\"usage: $progname [ -opts ] test [ test ... ] -v -- verbose -l logdir -- specify log directory (default is 'logdir')"# log an error to stderrprerr(){ echo "$*" >&2}fatal() { [ "$1" ] && prerr $* prerr "$USAGE" exit 1}warn() { [ "$1" ] && prerr $*}## process the options## defaults for getopt vars#verbose=""logdir=logwhile getopts v12o:l: OPTdo case "$OPT" in v) verbose="yes";; l) logdir="$OPTARG";; *) fatal;; esacdoneshiftcount=`expr $OPTIND - 1`shift $shiftcountargs=$*## Run the tests#test -d $logdir || fatal "No log directory: ./$logdir"tests="$args"if [ ! "$tests" ]then cd $logdir set -- `ls -1 sp* mp??_? psx* itron* mp*_?_g 2>/dev/null | grep -v info` cd .. tests="$*"fifor t in $testsdo logfile=$t if [ ! -f $logdir/$logfile ] then continue fi echo $logfile echo case $t in mp*) mptest=`echo $t | sed 's/_.//'` node=`echo $t | sed 's/...._//'` tmp_scn_file=mptests/node$node/$mptest.scn;; sp*) tmp_scn_file=sptests/$t.scn;; psx*) tmp_scn_file=psxtests/$t.scn;; itron*) tmp_scn_file=itrontests/$t.scn;; *) fatal "unknown test $t";; esac scn_file=`echo $tmp_scn_file | sed -e s/_g//` sed -e '/^$/d' < $logdir/$logfile | diff -b screens/$scn_file - echo echodoneexit 0# Local Variables: ***# mode:ksh ***# End: ***
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -