diff options
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; |