]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/lei-import-maildir.t
lei rm: new command to remove messages from index
[public-inbox.git] / t / lei-import-maildir.t
index f813440a92820574308d2af4805bec08d2c65036..688b10ce78a0e866ae84b0502712e5db6dd497a7 100644 (file)
@@ -68,5 +68,12 @@ test_lei(sub {
        $res = json_utf8->decode($lei_out);
        is_deeply($res, [ undef ], 'trashed message not imported')
                        or diag explain($imp_err, $res);
+
+       lei_ok qw(rm t/data/0001.patch);
+       lei_ok(qw(q s:boolean));
+       is($lei_out, "[null]\n", 'removed message gone from results');
+       my $g0 = "$ENV{HOME}/.local/share/lei/store/local/0.git";
+       my $x = xqx(['git', "--git-dir=$g0", qw(cat-file blob HEAD:d)]);
+       is($?, 0, "git cat-file shows file is `d'");
 });
 done_testing;