Commit 16718ca9 16718ca90cb779efceb7bf66af7e8e95a56ba36d by Sergey Poznyakoff

Compute upper limit for the message set spec based on the value of MU_ULONG_MAX.

1 parent f669ef51
...@@ -23,23 +23,29 @@ ...@@ -23,23 +23,29 @@
23 # Reported: by idefense.com on Thu, 12 May 2005 13:30:06 -0400 23 # Reported: by idefense.com on Thu, 12 May 2005 13:30:06 -0400
24 # References: <FB24803D1DF2A34FA59FC157B77C9705043322C1@IDSERV04.idef.com> 24 # References: <FB24803D1DF2A34FA59FC157B77C9705043322C1@IDSERV04.idef.com>
25 25
26 imap4d_start 26 if { $MU_ULONG_MAX > 0 } {
27 imap4d_auth "user!passwd" "guessme" 27 imap4d_start
28 imap4d_auth "user!passwd" "guessme"
28 29
29 imap4d_test "SELECT mbox1" \ 30 imap4d_test "SELECT mbox1" \
30 "5 EXISTS"\ 31 "5 EXISTS"\
31 "5 RECENT"\ 32 "5 RECENT"\
32 -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\ 33 -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\
33 "OK \[UIDNEXT 6\] Predicted next uid"\ 34 "OK \[UIDNEXT 6\] Predicted next uid"\
34 "OK \[UNSEEN 1\] first unseen messsage"\ 35 "OK \[UNSEEN 1\] first unseen messsage"\
35 "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\ 36 "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\
36 "OK \[PERMANENTFLAGS (\\Answered \\Deleted \\Seen)\] Permanent flags" \ 37 "OK \[PERMANENTFLAGS (\\Answered \\Deleted \\Seen)\] Permanent flags" \
37 "OK" 38 "OK"
38 39
39 imap4d_test "FETCH 1:4294967294 FLAGS" \ 40 set limit [expr $MU_ULONG_MAX - 1]
40 "BAD FETCH Bogus number set" 41 verbose "LIMIT is $limit"
42 imap4d_test "FETCH 1:$limit FLAGS" \
43 "BAD FETCH Bogus number set"
41 44
42 imap4d_test "UID FETCH 1:4294967294 FLAGS" \ 45 imap4d_test "UID FETCH 1:$limit FLAGS" \
43 "BAD UID FETCH Bogus number set" 46 "BAD UID FETCH Bogus number set"
47 } else {
48 unsupported "IDEF0955";
49 }
44 50
45 # End of IDEF0955.exp 51 # End of IDEF0955.exp
......
...@@ -22,20 +22,26 @@ ...@@ -22,20 +22,26 @@
22 # Reported: by idefense.com on Thu, 12 May 2005 13:30:04 -0400 22 # Reported: by idefense.com on Thu, 12 May 2005 13:30:04 -0400
23 # References: <FB24803D1DF2A34FA59FC157B77C9705043322C0@IDSERV04.idef.com> 23 # References: <FB24803D1DF2A34FA59FC157B77C9705043322C0@IDSERV04.idef.com>
24 24
25 imap4d_start 25 if { $MU_ULONG_MAX > 0 } {
26 imap4d_auth "user!passwd" "guessme" 26 imap4d_start
27 imap4d_auth "user!passwd" "guessme"
27 28
28 imap4d_test "SELECT mbox1" \ 29 imap4d_test "SELECT mbox1" \
29 "5 EXISTS"\ 30 "5 EXISTS"\
30 "5 RECENT"\ 31 "5 RECENT"\
31 -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\ 32 -re {OK \[UIDVALIDITY [0-9]+\] UID valididy status}\
32 "OK \[UIDNEXT 6\] Predicted next uid"\ 33 "OK \[UIDNEXT 6\] Predicted next uid"\
33 "OK \[UNSEEN 1\] first unseen messsage"\ 34 "OK \[UNSEEN 1\] first unseen messsage"\
34 "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\ 35 "FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)"\
35 "OK \[PERMANENTFLAGS (\\Answered \\Deleted \\Seen)\] Permanent flags" \ 36 "OK \[PERMANENTFLAGS (\\Answered \\Deleted \\Seen)\] Permanent flags" \
36 "OK" 37 "OK"
37 38
38 imap4d_test "FETCH 1 BODY\[TEXT\]<0.4294967294>" \ 39 set limit [expr $MU_ULONG_MAX - 1]
39 "BAD FETCH Completed" 40 verbose "LIMIT is $limit"
40 41
42 imap4d_test "FETCH 1 BODY\[TEXT\]<0.$limit>" \
43 "BAD FETCH Completed"
44 } else {
45 unsupported "IDEF0956"
46 }
41 # End of IDEF0956.exp 47 # End of IDEF0956.exp
......