3 # TODO FIX uh oh this and the other missing msg cases passed by accident after inc uses ESEARCH
4 # and now switching inc to leave mailbox open has broken it completely!
6 if test -z "$MH_OBJ_DIR"; then
7 srcdir
=`dirname "$0"`/..
/..
8 MH_OBJ_DIR
=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
11 .
"$MH_OBJ_DIR/test/common.sh"
13 # common.sh sets this to something crazy; did i do that?!
14 testname
=${0#$srcdir/}
16 setup_test_without_data Mail
19 #### Save exit status to use as status for this program.
25 [ -n "$imapd_pid" ] && kill $imapd_pid
26 "$MH_OBJ_DIR/target/debug/mhimap" imap shutdown
28 # TODO have cleanup allow additional cleanup registration?
29 # Or just allow it to accept status as argument.
35 covdir
="$MH_OBJ_DIR/covdata/${MH_COVERAGE_PROFILE:-default}/$testname"
37 export LLVM_PROFILE_FILE
="$covdir/$profile-%m.profraw"
39 imapd
="$MH_TEST_DIR/$$.imapd"
40 start_fakeinetd
"$imapd"
41 imapd_pid
=$fakeinetd_pid
45 imap-manager: $MH_OBJ_DIR/target/debug/imap-folder-manager
46 imap-socket: $MH_TEST_DIR/Mail/imap.d/socket
47 imap-db: $MH_TEST_DIR/Mail/imap.d
49 imap-port: $fakeinetd_port
50 imap-tls: don't protect my data i know what i'm doing
52 imap-mailbox-root: test/
54 if [ -n "$MH_TEST_IMAP_LOG_LEVEL" ]; then
55 echo "imap-log-level: $MH_TEST_IMAP_LOG_LEVEL" >> "$MH"
56 echo "imap-log-$MH_TEST_IMAP_LOG_LEVEL-to: $MH_TEST_DIR/$profile/imap.d/log.$MH_TEST_IMAP_LOG_LEVEL" >> "$MH"
59 # TODO handle this case next:
60 # UIDNEXT 12 so FETCH 1:11 but nothing is returned; 11 was deleted but never seen.
62 cat > "$imapd" <<EOSCRIPT
65 * PREAUTH [CAPABILITY IMAP4REV1 UIDPLUS] authenticated
66 * LIST (\NoInferiors \UnMarked) "/" test/fold
69 * OK [UIDVALIDITY 1603585238] UID validity status
70 * OK [UIDNEXT 12] Predicted next UID
71 1 OK [READ-WRITE] SELECT completed
72 1 OK UID FETCH completed
73 1 OK SEARCH ALL completed
76 while read line; do :; done
80 check_exit
'-eq 0' inc
+imap