@@ -39,6 +39,9 @@ def teardown
39
39
# RFC3501 §7.2.5: SEARCH response (obsolete in IMAP4rev2):
40
40
generate_tests_from fixture_file : "search_responses.yml"
41
41
42
+ # §7.5.2: FETCH response, misc msg-att
43
+ generate_tests_from fixture_file : "fetch_responses.yml"
44
+
42
45
# §7.5.2: FETCH response, BODYSTRUCTURE msg-att
43
46
generate_tests_from fixture_file : "body_structure_responses.yml"
44
47
@@ -81,50 +84,6 @@ def test_flag_xlist_inbox
81
84
assert_equal [ :Inbox ] , response . data . attr
82
85
end
83
86
84
- def test_msg_att_extra_space
85
- parser = Net ::IMAP ::ResponseParser . new
86
- response = parser . parse ( <<EOF . gsub ( /\n / , "\r \n " ) )
87
- * 1 FETCH (UID 92285)
88
- EOF
89
- assert_equal 92285 , response . data . attr [ "UID" ]
90
-
91
- response = parser . parse ( <<EOF . gsub ( /\n / , "\r \n " ) )
92
- * 1 FETCH (UID 92285 )
93
- EOF
94
- assert_equal 92285 , response . data . attr [ "UID" ]
95
- end
96
-
97
- def test_msg_att_parse_error
98
- parser = Net ::IMAP ::ResponseParser . new
99
- e = assert_raise ( Net ::IMAP ::ResponseParseError ) {
100
- parser . parse ( <<EOF . gsub ( /\n / , "\r \n " ) )
101
- * 123 FETCH (UNKNOWN 92285)
102
- EOF
103
- }
104
- assert_match ( / for \{ 123\} / , e . message )
105
- end
106
-
107
- def test_msg_att_rfc822_text
108
- parser = Net ::IMAP ::ResponseParser . new
109
- response = parser . parse ( <<EOF . gsub ( /\n / , "\r \n " ) )
110
- * 123 FETCH (RFC822 {5}
111
- foo
112
- )
113
- EOF
114
- assert_equal ( "foo\r \n " , response . data . attr [ "RFC822" ] )
115
- response = parser . parse ( <<EOF . gsub ( /\n / , "\r \n " ) )
116
- * 123 FETCH (RFC822[] {5}
117
- foo
118
- )
119
- EOF
120
- assert_equal ( "foo\r \n " , response . data . attr [ "RFC822" ] )
121
- end
122
-
123
- def assert_parseable ( s )
124
- parser = Net ::IMAP ::ResponseParser . new
125
- parser . parse ( s . gsub ( /\n / , "\r \n " ) )
126
- end
127
-
128
87
def test_enable
129
88
parser = Net ::IMAP ::ResponseParser . new
130
89
response = parser . parse ( "* ENABLED SMTPUTF8\r \n " )
@@ -146,13 +105,6 @@ def test_status
146
105
assert_equal ( 1234 , response . data . attr [ "UIDVALIDITY" ] )
147
106
end
148
107
149
- # [Bug #10119]
150
- def test_msg_att_modseq_data
151
- parser = Net ::IMAP ::ResponseParser . new
152
- response = parser . parse ( "* 1 FETCH (FLAGS (\S een) MODSEQ (12345) UID 5)\r \n " )
153
- assert_equal ( 12345 , response . data . attr [ "MODSEQ" ] )
154
- end
155
-
156
108
def test_continuation_request_without_response_text
157
109
parser = Net ::IMAP ::ResponseParser . new
158
110
response = parser . parse ( "+\r \n " )
0 commit comments