From 016586824f87d2b70641b1e344bac87b7aa752f2 Mon Sep 17 00:00:00 2001 From: shugo Date: Wed, 19 Jul 2017 23:08:34 +0000 Subject: lib/net/imap.rb: Ignore trailing space for Microsoft Exchange Server MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- test/net/imap/test_imap_response_parser.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/net/imap') 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 -- cgit v1.2.3