~peter-pearse/ubuntu/oneiric/bogofilter/prop001

« back to all changes in this revision

Viewing changes to src/tests/t.message_id

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2008-06-18 23:45:23 UTC
  • mfrom: (1.2.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20080618234523-7yoaxiatb0fz1f5j
Tags: upstream-1.1.7
ImportĀ upstreamĀ versionĀ 1.1.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
. ${srcdir=.}/t.frame
4
4
 
5
 
CFG=${TMPDIR}/test.cf
6
 
OUT=${TMPDIR}/test.out
7
 
CORRECT=${SYSTEST}/outputs/message_id.ref
 
5
CFG="$TMPDIR"/test.cf
 
6
OUT="$TMPDIR"/test.out
 
7
CORRECT="$SYSTEST"/outputs/message_id.ref
8
8
 
9
 
cat <<EOF > $CFG
 
9
cat <<EOF > "$CFG"
10
10
# include message ID
11
11
# suppress timestamps & version info in output
12
12
header_format=%h: %c, message_id=%I
13
13
EOF
14
14
 
15
15
# build wordlists
16
 
$BOGOFILTER -n -v -D -c $CFG -M -B ${srcdir}/inputs/good.mbx > /dev/null
17
 
$BOGOFILTER -s -v -D -c $CFG -M -B ${srcdir}/inputs/spam.mbx > /dev/null
18
 
 
19
 
$BOGOFILTER -v -D -c $CFG -M -B ${srcdir}/inputs/good.mbx \
20
 
    ${srcdir}/inputs/spam.mbx \
21
 
| sed 's}.*/inputs/}inputs/}' > $OUT
 
16
$BOGOFILTER -n -v -D -c "$CFG" -M -B "$srcdir"/inputs/good.mbx > /dev/null
 
17
$BOGOFILTER -s -v -D -c "$CFG" -M -B "$srcdir"/inputs/spam.mbx > /dev/null
 
18
$BOGOFILTER -v -D -c "$CFG" -M -B "$srcdir"/inputs/good.mbx \
 
19
    "$srcdir"/inputs/spam.mbx \
 
20
| sed 's}.*/inputs/}inputs/}' > "$OUT"
22
21
 
23
22
# compare test output to reference output
24
23
 
25
24
if  [ $verbose -eq 0 ]; then
26
 
    diff $CORRECT $OUT
27
 
    cmp $CORRECT $OUT
 
25
    cmp "$CORRECT" "$OUT"
28
26
else
29
 
    diff $DIFF_BRIEF $CORRECT $OUT
 
27
    diff $DIFF_BRIEF "$CORRECT" "$OUT"
30
28
fi