diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-19 02:32:59 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-19 02:32:59 +0000 |
commit | 28b5db007f531a95917a07ed02146fc8360ae104 (patch) | |
tree | 2676eeea9e876b99df0c2f2e7de98a962469b19d /test | |
parent | 29cbd3392343b91ef4269416d5f4ed3406d2ce26 (diff) | |
download | ruby-28b5db007f531a95917a07ed02146fc8360ae104.tar.gz |
* lib/net/imap.rb (msg_att): accepts extra space before ')'.
based on the patch by art lussos. [Bug #5163] [ruby-core:38820]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/net/imap/test_imap_response_parser.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/net/imap/test_imap_response_parser.rb b/test/net/imap/test_imap_response_parser.rb index ccdffd21ca..6a5a117408 100644 --- a/test/net/imap/test_imap_response_parser.rb +++ b/test/net/imap/test_imap_response_parser.rb @@ -99,4 +99,21 @@ EOF EOF assert_equal [1, 2, 3], response.data end + + def test_msg_att_extra_space + parser = Net::IMAP::ResponseParser.new + response = parser.parse(<<EOF.gsub(/\n/, "\r\n").taint) +* 1 FETCH (UID 92285) +EOF + assert_equal 92285, response.data.attr["UID"] + + response = parser.parse(<<EOF.gsub(/\n/, "\r\n").taint) +* 1 FETCH (UID 92285 ) +EOF + assert_equal 92285, response.data.attr["UID"] + + response = parser.parse(<<EOF.gsub(/\n/, "\r\n").taint) +* 1 FETCH (UID 92285 ) +EOF + end end |