1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/net/imap.rb (rfc822_text): ignore [] after RFC822.

[ruby-core:40945] [Bug #5620]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shugo 2012-03-16 04:56:18 +00:00
parent 5308538bef
commit ed07df5ab5
3 changed files with 26 additions and 0 deletions

View file

@ -126,4 +126,20 @@ EOF
}
assert_match(/ for \{123\}/, e.message)
end
def test_msg_att_rfc822_text
parser = Net::IMAP::ResponseParser.new
response = parser.parse(<<EOF.gsub(/\n/, "\r\n").taint)
* 123 FETCH (RFC822 {5}
foo
)
EOF
assert_equal("foo\r\n", response.data.attr["RFC822"])
response = parser.parse(<<EOF.gsub(/\n/, "\r\n").taint)
* 123 FETCH (RFC822[] {5}
foo
)
EOF
assert_equal("foo\r\n", response.data.attr["RFC822"])
end
end