* backport r33001 from trunk.

* 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/branches/ruby_1_9_3@33003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shugo 2011-08-19 02:39:34 +00:00
parent bc6c037f84
commit b824aff1ae
3 changed files with 25 additions and 1 deletions

View file

@ -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