diff options
author | Eric Wong <e@80x24.org> | 2021-05-19 08:54:13 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-05-19 17:55:47 +0000 |
commit | 2f720902ed702b64d918165ba21a96dabbeeca26 (patch) | |
tree | cd1097510c7c635d58c21c79afd024f0837f35e5 /t | |
parent | 94be0536ce5eaf1d5a67f217dce112607624389c (diff) | |
download | public-inbox-2f720902ed702b64d918165ba21a96dabbeeca26.tar.gz |
mbsync and offlineimap both use ":2," suffixes for filenames in "new/", however my interpretation of the Maildir spec at <https://cr.yp.to/proto/maildir.html> is that ":2," is only for files in "cur/". My interpretation also matches that of doveecot, but we'll allow what mbsync and offlineimap do given their popularity.
Diffstat (limited to 't')
-rw-r--r-- | t/lei-index.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/lei-index.t b/t/lei-index.t index 3382d42b..b7dafb71 100644 --- a/t/lei-index.t +++ b/t/lei-index.t @@ -27,6 +27,11 @@ my $expect = do { local $/; <$fh>; }; + +# mbsync and offlineimap both put ":2," in "new/" files: +symlink(File::Spec->rel2abs('t/utf8.eml'), "$tmpdir/md/new/u:2,") or + xbail "symlink $!"; + test_lei({ tmpdir => $tmpdir }, sub { my $store_path = "$ENV{HOME}/.local/share/lei/store/"; @@ -40,13 +45,16 @@ test_lei({ tmpdir => $tmpdir }, sub { lei_ok(qw(q mid:qp@example.com -f text)); like($lei_out, qr/^hi = bye/sm, 'lei2mail fallback'); + lei_ok(qw(q mid:testmessage@example.com -f text)); + lei_ok(qw(-C / blob --mail 9bf1002c49eb075df47247b74d69bcd555e23422)); + my $all_obj = ['git', "--git-dir=$store_path/ALL.git", qw(cat-file --batch-check --batch-all-objects)]; is_deeply([xqx($all_obj)], [], 'no git objects'); lei_ok('import', 't/plack-qp.eml'); ok(grep(/\A$blob blob /, my @objs = xqx($all_obj)), 'imported blob'); - lei_ok(qw(q z:0.. --dedupe=none)); + lei_ok(qw(q m:qp@example.com --dedupe=none)); my $res_b = json_utf8->decode($lei_out); is_deeply($res_b, $res_a, 'no extra DB entries'); |