File tree 2 files changed +17
-2
lines changed 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ is-it-maintained-open-issues = { repository = "jonhoo/rust-imap" }
25
25
native-tls = " 0.2.2"
26
26
regex = " 1.0"
27
27
bufstream = " 0.1"
28
- imap-proto = " 0.8 "
29
- nom = " 4 .0"
28
+ imap-proto = " 0.9.0 "
29
+ nom = " 5 .0"
30
30
base64 = " 0.10"
31
31
chrono = " 0.4"
32
32
lazy_static = " 1.4"
Original file line number Diff line number Diff line change @@ -351,6 +351,21 @@ mod tests {
351
351
}
352
352
}
353
353
354
+ #[ test]
355
+ fn parse_capability_case_insensitive_test ( ) {
356
+ // Test that "IMAP4REV1" (instead of "IMAP4rev1") is accepted
357
+ let expected_capabilities = vec ! [ "IMAP4rev1" , "STARTTLS" ] ;
358
+ let lines = b"* CAPABILITY IMAP4REV1 STARTTLS\r \n " ;
359
+ let ( mut send, recv) = mpsc:: channel ( ) ;
360
+ let capabilities = parse_capabilities ( lines. to_vec ( ) , & mut send) . unwrap ( ) ;
361
+ // shouldn't be any unexpected responses parsed
362
+ assert ! ( recv. try_recv( ) . is_err( ) ) ;
363
+ assert_eq ! ( capabilities. len( ) , 2 ) ;
364
+ for e in expected_capabilities {
365
+ assert ! ( capabilities. has_str( e) ) ;
366
+ }
367
+ }
368
+
354
369
#[ test]
355
370
#[ should_panic]
356
371
fn parse_capability_invalid_test ( ) {
You can’t perform that action at this time.
0 commit comments