diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-16 04:56:18 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-03-16 04:56:18 +0000 |
commit | ed07df5ab5e183aed62cbe33f50a57640617d7a4 (patch) | |
tree | 480a7ea5ab934a9cd7876cb372f51c6b71a11e96 /test/net/imap | |
parent | 5308538befe847d3b9774257a54d9c4d5b47bd94 (diff) | |
download | ruby-ed07df5ab5e183aed62cbe33f50a57640617d7a4.tar.gz |
* 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
Diffstat (limited to 'test/net/imap')
-rw-r--r-- | test/net/imap/test_imap_response_parser.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/net/imap/test_imap_response_parser.rb b/test/net/imap/test_imap_response_parser.rb index 3f26e0b350..b4d36c9091 100644 --- a/test/net/imap/test_imap_response_parser.rb +++ b/test/net/imap/test_imap_response_parser.rb @@ -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 |