@@ -1206,10 +1206,23 @@ def test_unselect
1206
1206
end
1207
1207
1208
1208
server . on "SEARCH" , &search_resp
1209
- assert_equal search_result , imap . search ( [ "subject" , "hello" ,
1209
+ assert_equal search_result , imap . search ( [ "subject" , "hello world " ,
1210
1210
[ 1 ..5 , 8 , 10 ..-1 ] ] )
1211
1211
cmd = server . commands . pop
1212
- assert_equal [ "SEARCH" , "subject hello 1:5,8,10:*" ] , [ cmd . name , cmd . args ]
1212
+ assert_equal (
1213
+ [ "SEARCH" , 'subject "hello world" 1:5,8,10:*' ] ,
1214
+ [ cmd . name , cmd . args ]
1215
+ )
1216
+
1217
+ imap . search ( [ "OR" , 1 ..1000 , -1 , "UID" , 12345 ..-1 ] )
1218
+ assert_equal "OR 1:1000 * UID 12345:*" , server . commands . pop . args
1219
+
1220
+ imap . search ( [ 1 ..1000 , "UID" , 12345 ..] )
1221
+ assert_equal "1:1000 UID 12345:*" , server . commands . pop . args
1222
+
1223
+ # Unfortunately, we can't send every sequence-set string directly
1224
+ imap . search ( [ "SUBJECT" , "1,*" ] )
1225
+ assert_equal 'SUBJECT "1,*"' , server . commands . pop . args
1213
1226
1214
1227
server . on "UID SEARCH" , &search_resp
1215
1228
assert_equal search_result , imap . uid_search ( [ "subject" , "hello" ,
0 commit comments