📄 lexer.mbx
字号:
#! /bin/shset -e# Note: When run via "make check", test output files are automatically deleted.# When run from the command line, outputs files are left in directory# lexer.mbx.YYYYMMDD. This is useful when something is different.## ./inputs - test inputs# ./outputs - known correct outputs## lexer.mbx.YYYYMMDD:# tests - directory containing individual output files: ${srcdir=.}relpath="`pwd`/../.."NODB=1 . ${srcdir}/../t.frameOUT="lexer.mbx.out"verbose=0if [ "$1" = "-v" ]; then verbose=1 v="-v"fiif [ "$1" = "-vv" ]; then verbose=1 v="-v -x l"fiBOGOLEXER="$VAL ${relpath}/bogolexer"for f in good spam ; do $BOGOLEXER -C -D -p $v < ${srcdir}/inputs/$f.mbx > $TMPDIR/$f.1 sort < $TMPDIR/$f.1 | uniq > $TMPDIR/$f.2 if [ $verbose -ne 0 ]; then $BOGOLEXER -C -D -x ml -vvv -p < ${srcdir}/inputs/$f.mbx > $TMPDIR/$f.v fidoneRESULT=`cat $TMPDIR/spam.2 | wc -l`.`cat $TMPDIR/good.2 | wc -l`RESULT=`echo $RESULT | sed s@\ @@g`#strict checkingWANT="1102.3073"#loose checkingWANT="1103.3073"# v0.12.4 - parsing adds '!' and money amountsWANT="1126.3080"# v0.13.0 - new parsing rules - case sensitive, header_line_markup, tokenize_html_tagsWANT="1690.3918"# v0.13.5 - new parsing rules - allow terminal exclamation pointsWANT="1724.3937"# v0.13.6.2 - lexer_v3.l changes to exclude bracketsWANT="1723.3931"# v0.13.7.3 - lexer_v3.l changes to allow space in mime boundaryWANT="1722.3929"# v0.15 - removed html.c - process_html_comments()WANT="1720.3925"# v0.15.1 - unfolding header lines ...WANT="1720.3927"# v0.15.1 - discarding message separatorsWANT="1710.3914"# v0.15.1 - discarding additional message idsWANT="1708.3909"if [ "$RESULT" != "$WANT" -o $verbose -ne 0 ] ; then echo want: $WANT, have: $RESULT | tee $TMPDIR/$OUTfi[ ! -z "$BF_SAVEDIR" ] && . ${srcdir}/../t.savetest "$RESULT" = "$WANT"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -