Bump version number
[mmh] / test / tests / rcv / test-rcvpack
1 #!/bin/sh
2 ######################################################
3 #
4 # Test rcvpack
5 #
6 ######################################################
7
8
9 . "$MH_TEST_COMMON"
10
11
12
13 # check -help
14 runandcheck "rcvpack -help" <<!
15 Usage: rcvpack [switches] file
16   switches are:
17   -Version
18   -help
19 !
20
21 # check -Version
22 case `rcvpack -V` in
23   rcvpack\ --*) ;;
24   *           ) printf '%s: rcvpack -v generated unexpected output\n' "$0" >&2
25                 failed=`expr ${failed:-0} + 1`;;
26 esac
27
28 # check unknown switch
29 runandcheck "rcvpack -nonexistent" <<!
30 rcvpack: -nonexistent unknown
31 !
32
33 # check with no switches
34 runandcheck "rcvpack </dev/null" <<!
35
36 !
37
38
39 # check mbox creation
40 runandcheck "rcvpack <$MH_TEST_DIR/Mail/inbox/1 $MH_TEST_DIR/Mail/mbox" <<!
41 !
42 inc -file $MH_TEST_DIR/Mail/mbox -silent
43 diff -u "$MH_TEST_DIR/Mail/inbox/1" "$MH_TEST_DIR/Mail/inbox/11"
44
45
46 # check append to existing mbox file
47 runandcheck "rcvpack <$MH_TEST_DIR/Mail/inbox/2 $MH_TEST_DIR/Mail/mbox" <<!
48 !
49 inc -file $MH_TEST_DIR/Mail/mbox -silent
50 diff -u "$MH_TEST_DIR/Mail/inbox/1" "$MH_TEST_DIR/Mail/inbox/12"
51 diff -u "$MH_TEST_DIR/Mail/inbox/2" "$MH_TEST_DIR/Mail/inbox/13"
52