@@ -27,6 +27,9 @@ def teardown
27
27
############################################################################
28
28
# Core IMAP, by RFC9051 section (w/obsolete in relative RFC3501 section):
29
29
30
+ # §7.1: Generic Status Responses (OK, NO, BAD, PREAUTH, BYE, codes, text)
31
+ generate_tests_from fixture_file : "resp_text_responses.yml"
32
+
30
33
# §7.2.2: CAPABILITY response
31
34
generate_tests_from fixture_file : "capability_responses.yml"
32
35
@@ -78,14 +81,6 @@ def test_flag_xlist_inbox
78
81
assert_equal [ :Inbox ] , response . data . attr
79
82
end
80
83
81
- def test_resp_text_code
82
- parser = Net ::IMAP ::ResponseParser . new
83
- response = parser . parse ( <<EOF . gsub ( /\n / , "\r \n " ) )
84
- * OK [CLOSED] Previous mailbox closed.
85
- EOF
86
- assert_equal "CLOSED" , response . data . code . name
87
- end
88
-
89
84
def test_msg_att_extra_space
90
85
parser = Net ::IMAP ::ResponseParser . new
91
86
response = parser . parse ( <<EOF . gsub ( /\n / , "\r \n " ) )
@@ -158,22 +153,6 @@ def test_msg_att_modseq_data
158
153
assert_equal ( 12345 , response . data . attr [ "MODSEQ" ] )
159
154
end
160
155
161
- def test_msg_rfc3501_response_text_with_T_LBRA
162
- parser = Net ::IMAP ::ResponseParser . new
163
- response = parser . parse ( "RUBY0004 OK [READ-WRITE] [Gmail]/Sent Mail selected. (Success)\r \n " )
164
- assert_equal ( "RUBY0004" , response . tag )
165
- assert_equal ( "READ-WRITE" , response . data . code . name )
166
- assert_equal ( "[Gmail]/Sent Mail selected. (Success)" , response . data . text )
167
- end
168
-
169
- def test_msg_rfc3501_response_text_with_BADCHARSET_astrings
170
- parser = Net ::IMAP ::ResponseParser . new
171
- response = parser . parse ( "t BAD [BADCHARSET (US-ASCII \" [astring with brackets]\" )] unsupported charset foo.\r \n " )
172
- assert_equal ( "t" , response . tag )
173
- assert_equal ( "unsupported charset foo." , response . data . text )
174
- assert_equal ( "BADCHARSET" , response . data . code . name )
175
- end
176
-
177
156
def test_continuation_request_without_response_text
178
157
parser = Net ::IMAP ::ResponseParser . new
179
158
response = parser . parse ( "+\r \n " )
0 commit comments