~matthiasbeyer/maildir

maildir/tests d---------
83ccf89f — Kartikaya Gupta 1 year, 7 months ago
Bump mailparse to 0.12
f2a2e93d — Kartikaya Gupta 1 year, 7 months ago
Run cargo fmt
9776aaa0 — Kartikaya Gupta 1 year, 7 months ago
Add functions for flag fiddling, and also normalize flag order per spec
2d81deca — Kartikaya Gupta 1 year, 11 months ago
Add a delete function to remove mail files
1f5e605b — Andreas Rottmann 2 years ago
tests: Fix clippy warning

This does not really improve code quality, but does not make the code
worse, either.
a0a81150 — Dan Čermák 2 years ago
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 one.
4eedd817 — Dan Čermák 2 years ago
Correct TEST_MAIL_BODY (first characters of each line were missing)

This example email was probably yanked incorrectly in
3ace2c97e8eeaba3bd36d6b371d00850790bdd4e
This commit restores the previous state.
a72f95dc — Andreas Rottmann 2 years ago
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
config.

Extending the API slightly, this commit also adds a `Maildir::path`
method, which came handy when refactoring the tests.

Fixes #6.
3ace2c97 — Andreas Rottmann 2 years ago
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
boundary.