]> diplodocus.org Git - nmh/blobdiff - test/inc/test-pop
Fixed mhical(1) exit status to reflect return status of icalparse().
[nmh] / test / inc / test-pop
index db21c31d66b2b58b37125f579ce37deff1046071..8b3fbe03069a900345d99ee562de3e88a0776853 100755 (executable)
@@ -71,6 +71,7 @@ Dude, nmh is totally brutal.
 EOM
 
 # Check netrc's permissions test
+start_test "netrc's permissions test"
 pid=`"${MH_OBJ_DIR}/test/fakepop" "$testport" '' '' "$testmessage"`
 chmod g=w,o=x $netrc
 run_test "inc -user ${TESTUSER} -host 127.0.0.1 -port $testport" \
@@ -89,6 +90,7 @@ i"
 check "$testmessage" `mhpath +inbox 11` 'keep first'
 
 # Check multiple messages at once
+start_test "multiple messages at once"
 
 pid=`"${MH_OBJ_DIR}/test/fakepop" "$testport" \
                        "$TESTUSER" "$TESTPASS" "$testmessage" \
@@ -105,27 +107,10 @@ check "$testmessage" `mhpath +inbox 11` 'keep first'
 check "${testmessage}.2" `mhpath +inbox 12`
 check "${testmessage}.3" `mhpath +inbox 13`
 
-# check -pack
-pid=`"${MH_OBJ_DIR}/test/fakepop" "$testport" \
-                       "$TESTUSER" "$TESTPASS" "$testmessage"`
-
-touch "$MH_TEST_DIR/inc.mbox"
-run_test "inc -user ${TESTUSER} -host 127.0.0.1 -port $testport -width 80 \
-          -pack $MH_TEST_DIR/inc.mbox" \
-       "Incorporating new mail into (null)...
-
-   1  12/17 No Such User       Hello<<Hey man, how's it going? . Hope you're do\
-i"
-run_test "inc -file $MH_TEST_DIR/inc.mbox -truncate -width 80" \
-       "Incorporating new mail into inbox...
-
-  11+ 12/17 No Such User       Hello<<Hey man, how's it going? . Hope you're do\
-i"
-
-check $testmessage `mhpath +inbox 11` 'keep first'
-rm -f "$MH_TEST_DIR/inc.mbox" "$MH_TEST_DIR/.inc.map" "$netrc"
+rm -f "$netrc"
 
 # check credentials: file
+start_test "credentials: file"
 # Redirect stdin so that inc doesn't wait on the user if it can't
 # read the netrc file, even though that shouldn't happen.
 TESTUSER=differenuser
@@ -139,18 +124,13 @@ echo "credentials: file:${netrc}" >>$MH
 pid=`"${MH_OBJ_DIR}/test/fakepop" "$testport" \
                        "$TESTUSER" "$TESTPASS" "$testmessage"`
 
-touch "$MH_TEST_DIR/inc.mbox"
-run_test "inc -user ${TESTUSER} -host 127.0.0.1 -port $testport -width 65 \
-          -pack $MH_TEST_DIR/inc.mbox" \
-       "Incorporating new mail into (null)...
-
-   1  12/17 No Such User       Hello<<Hey man, how's it going? . " </dev/null
-run_test "inc -file $MH_TEST_DIR/inc.mbox -truncate -width 65" \
+run_test "inc -user ${TESTUSER} -host 127.0.0.1 -port $testport -width 65" \
        "Incorporating new mail into inbox...
 
   11+ 12/17 No Such User       Hello<<Hey man, how's it going? . " </dev/null
-
 check $testmessage `mhpath +inbox 11`
-rm -f "$MH_TEST_DIR/inc.mbox" "$MH_TEST_DIR/.inc.map" "$netrc"
 
+rm -f "$netrc"
+
+finish_test
 exit ${failed:-0}