File tree Expand file tree Collapse file tree 2 files changed +37
-8
lines changed Expand file tree Collapse file tree 2 files changed +37
-8
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ :tests :
3
+
4
+ test_continuation_request_rfc3501_6.2.2_example :
5
+ :response : " + YDMGCSqGSIb3EgECAgIBAAD/////6jcyG4GE3KkTzBeBiVHeceP2CWY0SR0fAQAgAAQEBAQ=\r\n "
6
+ :expected : !ruby/struct:Net::IMAP::ContinuationRequest
7
+ data : !ruby/struct:Net::IMAP::ResponseText
8
+ code :
9
+ text : " YDMGCSqGSIb3EgECAgIBAAD/////6jcyG4GE3KkTzBeBiVHeceP2CWY0SR0fAQAgAAQEBAQ="
10
+ raw_data : " + YDMGCSqGSIb3EgECAgIBAAD/////6jcyG4GE3KkTzBeBiVHeceP2CWY0SR0fAQAgAAQEBAQ=\r\n "
11
+
12
+ test_continuation_request_rfc3501_6.3.11_example :
13
+ :response : " + Ready for literal data\r\n "
14
+ :expected : !ruby/struct:Net::IMAP::ContinuationRequest
15
+ data : !ruby/struct:Net::IMAP::ResponseText
16
+ code :
17
+ text : " Ready for literal data"
18
+ raw_data : " + Ready for literal data\r\n "
19
+
20
+ test_continuation_request_rfc3501_7.5_example :
21
+ :response : " + Ready for additional command text\r\n "
22
+ :expected : !ruby/struct:Net::IMAP::ContinuationRequest
23
+ data : !ruby/struct:Net::IMAP::ResponseText
24
+ code :
25
+ text : " Ready for additional command text"
26
+ raw_data : " + Ready for additional command text\r\n "
27
+
28
+ test_continuation_request_without_response_text :
29
+ :response : " +\r\n "
30
+ :expected : !ruby/struct:Net::IMAP::ContinuationRequest
31
+ data : !ruby/struct:Net::IMAP::ResponseText
32
+ code :
33
+ text : ' '
34
+ raw_data : " +\r\n "
Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ def teardown
51
51
# §7.5.2: FETCH response, BODYSTRUCTURE msg-att
52
52
generate_tests_from fixture_file : "body_structure_responses.yml"
53
53
54
+ # §7.6: Command Continuation Request
55
+ generate_tests_from fixture_file : "continuation_requests.yml"
56
+
54
57
############################################################################
55
58
# IMAP extensions, by RFC:
56
59
@@ -79,14 +82,6 @@ def test_enable
79
82
assert_equal ( "SMTPUTF8" , response . data . first )
80
83
end
81
84
82
- def test_continuation_request_without_response_text
83
- parser = Net ::IMAP ::ResponseParser . new
84
- response = parser . parse ( "+\r \n " )
85
- assert_instance_of ( Net ::IMAP ::ContinuationRequest , response )
86
- assert_equal ( nil , response . data . code )
87
- assert_equal ( "" , response . data . text )
88
- end
89
-
90
85
def test_ignored_response
91
86
parser = Net ::IMAP ::ResponseParser . new
92
87
response = nil
You can’t perform that action at this time.
0 commit comments