summaryrefslogtreecommitdiff
path: root/test/net/imap
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-19 23:08:34 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-19 23:08:34 +0000
commit016586824f87d2b70641b1e344bac87b7aa752f2 (patch)
tree551d37f1148c9856873be81e1d5e6b2bae59b44a /test/net/imap
parent02d1c08962d36c5598f4d285d21026edbebf8c5b (diff)
lib/net/imap.rb: Ignore trailing space for Microsoft Exchange Server
Based on the patch by keysen (Jérémy Carlier). [ruby-core:81641] [Bug #13649] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/net/imap')
-rw-r--r--test/net/imap/test_imap_response_parser.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/net/imap/test_imap_response_parser.rb b/test/net/imap/test_imap_response_parser.rb
index db07f9b022..3ebb248b4e 100644
--- a/test/net/imap/test_imap_response_parser.rb
+++ b/test/net/imap/test_imap_response_parser.rb
@@ -291,4 +291,17 @@ EOF
assert_equal("test.xml", body.parts[1].disposition.param["FILENAME"])
assert_equal(nil, body.parts[1].language)
end
+
+ # [Bug #13649]
+ def test_status
+ parser = Net::IMAP::ResponseParser.new
+ response = parser.parse("* STATUS INBOX (UIDNEXT 1 UIDVALIDITY 1234)\r\n")
+ assert_equal("STATUS", response.name)
+ assert_equal("INBOX", response.data.mailbox)
+ assert_equal(1234, response.data.attr["UIDVALIDITY"])
+ response = parser.parse("* STATUS INBOX (UIDNEXT 1 UIDVALIDITY 1234) \r\n")
+ assert_equal("STATUS", response.name)
+ assert_equal("INBOX", response.data.mailbox)
+ assert_equal(1234, response.data.attr["UIDVALIDITY"])
+ end
end