Commit 3cf313cb 3cf313cb3967c51742bd3396f6de96bf8957c054 by Sergey Poznyakoff

Use -re to check uidvalidity value, as we can never be sure the seconds

don't change between computing the uidvalidity value and running the test.
1 parent d0d0302f
......@@ -19,22 +19,27 @@
imap4d_start
imap4d_auth "user!passwd" "guessme"
set UIDVALIDITY [clock seconds]
proc get_uidvalidity {} {
regsub "(\[0-9\]*)\[0-9\]" "[clock seconds]" "\\1\[0-9\]" val
return $val
}
imap4d_test "EXAMINE INBOX"\
"95 EXISTS"\
"95 RECENT"\
"OK \[UIDVALIDITY $UIDVALIDITY\] UID valididy status"\
-re "OK \\\[UIDVALIDITY [get_uidvalidity]\\\] UID valididy status"\
"OK \[UIDNEXT 96\] Predicted next uid"\
"OK \[UNSEEN 1\] first unseen messsage"\
"FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\
"OK \[PERMANENTFLAGS ()\] No Permanent flags"\
"OK \[READ-ONLY\] EXAMINE Completed"
set UIDVALIDITY [clock seconds]
imap4d_test "SELECT INBOX"\
"95 EXISTS"\
"95 RECENT"\
"OK \[UIDVALIDITY $UIDVALIDITY\] UID valididy status"\
-re "OK \\\[UIDVALIDITY [get_uidvalidity]\\\] UID valididy status"\
"OK \[UIDNEXT 96\] Predicted next uid"\
"OK \[UNSEEN 1\] first unseen messsage "\
"FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\
......@@ -42,7 +47,7 @@ imap4d_test "SELECT INBOX"\
"OK \[READ-WRITE\] SELECT Completed"
imap4d_test "STATUS INBOX (MESSAGES RECENT UNSEEN UIDVALIDITY UIDNEXT)" \
"STATUS INBOX (MESSAGES 95 RECENT 95 UNSEEN 95 UIDVALIDITY $UIDVALIDITY UIDNEXT 96 )" \
-re "STATUS INBOX \\(MESSAGES 95 RECENT 95 UNSEEN 95 UIDVALIDITY [get_uidvalidity] UIDNEXT 96 \\)" \
"OK"
imap4d_test "STATUS mbox1 (MESSAGES RECENT UNSEEN UIDNEXT)" \
......@@ -53,7 +58,7 @@ set U [clock seconds]
imap4d_test "EXAMINE mbox1" \
"4 EXISTS"\
"4 RECENT"\
"OK \[UIDVALIDITY $U\] UID valididy status"\
-re "OK \\\[UIDVALIDITY [get_uidvalidity]\\\] UID valididy status"\
"OK \[UIDNEXT 5\] Predicted next uid"\
"OK \[UNSEEN 1\] first unseen messsage"\
"FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\
......