mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/net/imap.rb (search_response): parse MODSEQ in SEARCH
responses properly. [ruby-core:64203] [Bug #10112] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e84e56db54
commit
772e9778fb
3 changed files with 21 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Nov 14 01:26:47 2014 Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
* lib/net/imap.rb (search_response): parse MODSEQ in SEARCH
|
||||
responses properly. [ruby-core:64203] [Bug #10112]
|
||||
|
||||
Fri Nov 14 01:03:17 2014 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* test/lib/envutil.rb: Moved from test/ruby/.
|
||||
|
|
|
@ -2865,8 +2865,15 @@ module Net
|
|||
break
|
||||
when T_SPACE
|
||||
shift_token
|
||||
else
|
||||
when T_NUMBER
|
||||
data.push(number)
|
||||
when T_LPAR
|
||||
# TODO: include the MODSEQ value in a response
|
||||
shift_token
|
||||
match(T_ATOM)
|
||||
match(T_SPACE)
|
||||
match(T_NUMBER)
|
||||
match(T_RPAR)
|
||||
end
|
||||
end
|
||||
else
|
||||
|
|
|
@ -268,4 +268,12 @@ EOF
|
|||
assert_equal(empty_part.body.subtype, 'MIXED')
|
||||
assert_equal(empty_part.body.param['BOUNDARY'], '000e0cd29212e3e06a0486590ae2')
|
||||
end
|
||||
|
||||
# [Bug #10112]
|
||||
def test_search_modseq
|
||||
parser = Net::IMAP::ResponseParser.new
|
||||
response = parser.parse("* SEARCH 87216 87221 (MODSEQ 7667567)\r\n")
|
||||
assert_equal("SEARCH", response.name)
|
||||
assert_equal([87216, 87221], response.data)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue