File: t05-trainvalid

package info (click to toggle)
qsf 1.2.7-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, lenny, squeeze, wheezy
  • size: 1,372 kB
  • ctags: 598
  • sloc: ansic: 9,981; sh: 816; awk: 17; makefile: 6
file content (17 lines) | stat: -rw-r--r-- 366 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
#
# TEST: Validity of trained database:   

for SPAM in 1 12 3 7 9; do
	ISSPAM=0
	./mboxsplit $SPAM < .test-spam \
	| $PROG -d $BACKEND:$TESTDB -t || ISSPAM=1
	test $ISSPAM -eq 1 || exit 1
done

for NONSPAM in 5 13 2 8 14; do
	ISSPAM=0
	./mboxsplit $NONSPAM < .test-non-spam \
	| $PROG -d $BACKEND:$TESTDB -t || ISSPAM=1
	test $ISSPAM -eq 0 || exit 1
done