diff options
author | Eric Wong <e@80x24.org> | 2021-04-13 10:54:45 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-04-13 15:05:02 -0400 |
commit | 8ab43c1c27c725a8ef9307f5dba3e565169d48ca (patch) | |
tree | 12c761c064692e1c08b106b246fa72f713a73ee8 /t | |
parent | 26e0fe73de93f451ae5575f7625fec8ae020673c (diff) | |
download | public-inbox-8ab43c1c27c725a8ef9307f5dba3e565169d48ca.tar.gz |
This will have a over.sqlite3 for content-based deduplication. It may exhibit ibxish methods, so serving a read-only (or even R/W) IMAP or instance or displaying HTML isn't outside the realm of possibility.
Diffstat (limited to 't')
-rw-r--r-- | t/lei-q-save.t | 12 | ||||
-rw-r--r-- | t/lei.t | 2 | ||||
-rw-r--r-- | t/lei_saved_search.t | 10 |
3 files changed, 23 insertions, 1 deletions
diff --git a/t/lei-q-save.t b/t/lei-q-save.t new file mode 100644 index 00000000..56f7cb37 --- /dev/null +++ b/t/lei-q-save.t @@ -0,0 +1,12 @@ +#!perl -w +# Copyright (C) 2021 all contributors <meta@public-inbox.org> +# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt> +use strict; use v5.10.1; use PublicInbox::TestCommon; +test_lei(sub { + my $home = $ENV{HOME}; + lei_ok qw(import t/plack-qp.eml); + lei_ok qw(q --save z:0..), '-o', "$home/md/"; + my @s = glob("$home/.local/share/lei/saved-searches/md-*"); + is(scalar(@s), 1, 'got one saved search'); +}); +done_testing; @@ -114,7 +114,7 @@ my $test_completion = sub { %out = map { $_ => 1 } split(/\s+/s, $lei_out); for my $sw (qw(-f --format -o --output --mfolder --augment -a --mua --no-local --local --verbose -v - --save-as --no-remote --remote --torsocks + --save --no-remote --remote --torsocks --reverse -r )) { ok($out{$sw}, "$sw offered as `lei q' completion"); } diff --git a/t/lei_saved_search.t b/t/lei_saved_search.t new file mode 100644 index 00000000..6d26cd2b --- /dev/null +++ b/t/lei_saved_search.t @@ -0,0 +1,10 @@ +#!perl -w +# Copyright (C) 2021 all contributors <meta@public-inbox.org> +# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt> +use strict; +use v5.10.1; +use PublicInbox::TestCommon; +require_mods(qw(DBD::SQLite)); +use_ok 'PublicInbox::LeiSavedSearch'; + +done_testing; |