Commit Graph
10 Commits
Author SHA1 Message Date
Cory Benfield f3d154b06c Implement RFC 4469 CATENATE (#310)
Motivation:

CATENATE functionality is convenient for low-power client usage, as it
allows clients to stitch together new messages out of the parts of older
ones without needing to reupload (or indeed redownload) that content.

Modifications:

- Extend CommandStream to support CATENATE.
- Extend serializer and parser to work with new definitions.

Result:

CATENATE is parseable.
2020-09-15 11:08:14 +01:00
David Evans 495d5f8c4b Refactor tests part 2 (#279)
* Update testParse2Digit

* Update testParseToken

* Update testParseUnsubscribe

* Update testParseUID

* Update testParseUIDSet

* Update testParseUserId

* Update testUIDRange

* Update testParseUid

* Update testParseText

* Fix sanity

* Remove un-needed function

* Update parseTaggedResponse

* Update parseTag

* Update parseSequenceSet

* Update parseRename

* Update parseSubscribe

* Update parseStoreAttribueFlags

* Update parseStore

* Update parseStatus

* Update testParseSequenceSet

* Update parse NZNumber

* Update parseNumber

* Update parseNString

* Test utilities for void returning parsers

* Update testParseNil

* Update testParseNewline

* Update testParseNamespace

* Update testParseAddress

* Better error messages

* Update testParseSequenceRange

* Fix testParseStatus

* Update testParseSequenceNumber

* Update testParseSelect

* Update testParseSectionSpecifierKind

* Update testParseSectionSpecifier

* Update testParseSectionPart

* Update testParseSectionBinary

* Update testParseSection

* Update testParseSearchReturnOptionExtension

* Batch replace function calls

* Use new method almost everywhere

* Remove extra spacing

* Fix sanity

* Remove redundant function

* Remove redundant code

* Refactor parsing search keys
2020-07-31 01:54:17 -07:00
Johannes WeissandDavid Evans 525d58d1fa non-happy path tests: over/underflows (#220)
* Support encoding append commands

* Yay it works

* Cleanup 1

* Cleanup 2

* Fix sanity

* Fix command decoder test

* Fix parsing partial commands sync literals

* Fix parser stress tests

* Fix tests

* Remove unused code

* Code refactor and cleanup

* Fix sanity

Co-authored-by: David Evans <d.evans@apple.com>
2020-06-26 14:47:40 +01:00
David Evans a06b3898aa Hide incomplete message errors (#135)
* Hide incomplete message errors

* Fix sanity

* Throw error

* Fix rebase

* Refactor

* Log not throw

* Improve roundtrip handler

* Fix sanity

* Update comments

* Remove error case

* Logging

* PR review

* Simplify loop

* Use NIOSinglestep...

* Fix sanity

* Even more efficiency

* Fix sanity
2020-05-28 13:49:11 +01:00
David EvansandJohannes Weiss 042d11fe17 Add B2MD tests for most commands/responses (#125)
* Move tests to dedicated file

* Add NOOP tests

* Add capability tests

* Add logout tests

* Add starttls tests

* Add select tests

* Add examine tests

* Fix sanity

* Add create tests

* Add delete tests

* Fix sanity

* Add subscribe tests

* Add unsubscribe tests

* Add missing test file header

* Add check tests

* Fix sanity

* Rebase

* Add list tests

* Add LSUB tests

* Add status tests

* Add append tests

* Setup response tests

* Allow response parse mode override

* Temp remove append

* Conditional state tests

* Bye tests

* Capability tests

* Flags tests

* Exists tests

* Recent tests

* Expunge tests

* Tagged response tests

* List, LSUB, and status tests

* Comment everything

* Make tests use synchronizing literals

* Replace CRLF

* Test fetch responses

* Fix sanity

* Assert

* Refactor error catching

* Test that breaks synchronising literals

* fix some stuff

* Fix sanity

* Fix all the things

* Fix sanity

Co-authored-by: Johannes Weiss <johannesweiss@apple.com>
2020-05-20 17:40:56 +01:00
Daniel Eggert 17c740a21b Change TaggedCommand property name and property order. (#154) 2020-05-20 10:50:18 +01:00
David Evans 28225ece7d Remove NIOIMAP namespace 2020-05-09 14:46:42 +01:00
tomer doron 53efab1d95 standardize format (#80)
motivation: use standard format across all of our projects

changes:
* add .swiftformat settings based on what we use in other projects
* validate format in the sanity script
* format
2020-04-24 12:05:17 +01:00
David Evans 0f5de678e5 Rename top-level command types and flatten UID commands into Command (#90)
* Flatten UID commands

* Rename command types
2020-04-23 16:22:56 +01:00
David Evans 19ecdb9576 Seperate module (#61) 2020-04-20 12:41:39 +01:00