Blob Blame History Raw
#! /bin/sh

# Note:  When run via "make check", test output files are automatically deleted.
#	 When run from the command line, output files are left in directory
#	 longoptions.YYYYMMDD.  This is useful when something is different.
#
#	 ./inputs  - test inputs
#	 ./outputs - known correct outputs
#
#	 longoptions.YYYYMMDD:
#		directory containing individual output files

NODB=1 . ${srcdir:=.}/t.frame

CFG="$TMPDIR"/test.cf
MSG="$TMPDIR/test.msg"

cat > "$CFG" <<EOF
block_on_subnets  = No
charset_default   = us-ascii
replace_nonascii_characters = No
no-header-tags    = Yes
stats_in_header   = Yes
report-unsure     = No
thresh_update     = 0.000000
timestamp         = Yes
timestamp-date    = 20040822
EOF

cat > "$MSG" <<EOF
From test
Subject: subject

this is a test
EOF

$BOGOLEXER  -D -c "$CFG" -p -I "$MSG"    > "$TMPDIR"/bogolexer.out
$BOGOFILTER -D -c "$CFG" -v -n -I "$MSG" > "$TMPDIR/bogofilter.out"