]>
diplodocus.org Git - nmh/blob - test/inc/test-pop
2 ######################################################
4 # Test POP support in inc
5 # Only tests checking of local maildrop, does not
6 # test checking of POP server.
8 ######################################################
12 if test -z "${MH_OBJ_DIR}"; then
13 srcdir
=`dirname $0`/..
/..
14 MH_OBJ_DIR
=`cd $srcdir && pwd`; export MH_OBJ_DIR
17 .
"$MH_OBJ_DIR/test/common.sh"
22 # Some extra stuff we need for POP support
29 HOME
="${MH_TEST_DIR}"; export HOME
30 netrc
="${HOME}/.netrc"
31 echo "default login ${TESTUSER} password ${TESTPASS}" > "$netrc"
34 expected
=$MH_TEST_DIR/$$.expected
35 expected_err
=$MH_TEST_DIR/$$.expected_err
36 actual
=$MH_TEST_DIR/$$.actual
37 actual_err
=$MH_TEST_DIR/$$.actual_err
38 testmessage
=$MH_TEST_DIR/testmessage
40 cat > $testmessage <<EOM
41 Received: From somewhere
42 From: No Such User <nosuch@example.com>
43 To: Some Other User <someother@example.com>
45 Date: Sun, 17 Dec 2006 12:13:14 -0500
47 Hey man, how's it going?
49 Hope you're doing better.
52 pid
=`"${MH_OBJ_DIR}/test/fakepop" "$testmessage" "$testport" \
53 "$TESTUSER" "$TESTPASS"`
55 run_test
"inc -user ${TESTUSER} -host 127.0.0.1 -port $testport -width 80" \
56 "Incorporating new mail into inbox...
58 11+ 12/17 No Such User Hello<<Hey man, how's it going? . Hope you're do"
60 check
`mhpath +inbox 11` $testmessage
61 rm -f $testmessage "$netrc"