Add functions for flag fiddling, and also normalize flag order per spec
Add a delete function to remove mail files
tests: Fix clippy warning
This does not really improve code quality, but does not make the code
store_new and store_cur_with_flags now return the id of the inserted mail
Previously there was no trivial way how one could get the id of a freshly
inserted email. This commit modifies the return type of Maildir::store to
Result<String, MaildirError>, and returns the id on success.
The smoke test for store_new was modified to verify that the id is actually the
Correct TEST_MAIL_BODY (first characters of each line were missing)
This example email was probably yanked incorrectly in
This commit restores the previous state.
Make tests concurrency-safe
The tests now all operate on a temporary directory, potentially
containing the contents of the "testdata" directory. The contents is
not copied as-is, but destination filenames are derived via
percent-decoding from the source filenames.
This allows the tests to safely run concurrently, so the flags
enforcing single-threaded execution have been removed from the CI
Extending the API slightly, this commit also adds a `Maildir::path`
method, which came handy when refactoring the tests.
Pull tests out to a separate file
The tests are all written against the public API, so let's put them in
their own file, so they will be compiled separately, enforcing the API