-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 Merge pull request #367 from ruby/RFC9394-PARTIAL
✨ Add support for `PARTIAL` extension (RFC9394)
- Loading branch information
Showing
8 changed files
with
278 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
test/net/imap/fixtures/response_parser/rfc9394_partial.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
:tests: | ||
|
||
"RFC9394 PARTIAL 3.1. example 1": | ||
comment: | | ||
Neither RFC9394 nor RFC5267 contain any examples of a normal unelided | ||
sequence-set result. I've edited it to include a sequence-set here. | ||
:response: "* ESEARCH (TAG \"A01\") UID PARTIAL (-1:-100 200:250,252:300)\r\n" | ||
:expected: !ruby/struct:Net::IMAP::UntaggedResponse | ||
name: ESEARCH | ||
data: !ruby/object:Net::IMAP::ESearchResult | ||
tag: A01 | ||
uid: true | ||
data: | ||
- - PARTIAL | ||
- !ruby/object:Net::IMAP::ESearchResult::PartialResult | ||
range: !ruby/range | ||
begin: -100 | ||
end: -1 | ||
excl: false | ||
results: !ruby/object:Net::IMAP::SequenceSet | ||
string: 200:250,252:300 | ||
tuples: | ||
- - 200 | ||
- 250 | ||
- - 252 | ||
- 300 | ||
raw_data: "* ESEARCH (TAG \"A01\") UID PARTIAL (-1:-100 200:250,252:300)\r\n" | ||
|
||
"RFC9394 PARTIAL 3.1. example 2": | ||
:response: "* ESEARCH (TAG \"A02\") UID PARTIAL (23500:24000 55500:56000)\r\n" | ||
:expected: !ruby/struct:Net::IMAP::UntaggedResponse | ||
name: ESEARCH | ||
data: !ruby/object:Net::IMAP::ESearchResult | ||
tag: A02 | ||
uid: true | ||
data: | ||
- - PARTIAL | ||
- !ruby/object:Net::IMAP::ESearchResult::PartialResult | ||
range: !ruby/range | ||
begin: 23500 | ||
end: 24000 | ||
excl: false | ||
results: !ruby/object:Net::IMAP::SequenceSet | ||
string: 55500:56000 | ||
tuples: | ||
- - 55500 | ||
- 56000 | ||
raw_data: "* ESEARCH (TAG \"A02\") UID PARTIAL (23500:24000 55500:56000)\r\n" | ||
|
||
"RFC9394 PARTIAL 3.1. example 3": | ||
:response: "* ESEARCH (TAG \"A04\") UID PARTIAL (24000:24500 NIL)\r\n" | ||
:expected: !ruby/struct:Net::IMAP::UntaggedResponse | ||
name: ESEARCH | ||
data: !ruby/object:Net::IMAP::ESearchResult | ||
tag: A04 | ||
uid: true | ||
data: | ||
- - PARTIAL | ||
- !ruby/object:Net::IMAP::ESearchResult::PartialResult | ||
range: !ruby/range | ||
begin: 24000 | ||
end: 24500 | ||
excl: false | ||
results: | ||
raw_data: "* ESEARCH (TAG \"A04\") UID PARTIAL (24000:24500 NIL)\r\n" |
Oops, something went wrong.