diff options
author | Eric Wong <e@80x24.org> | 2021-01-10 12:14:58 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-12 03:51:42 +0000 |
commit | 4ff570e5c3cfb33aff3ca6ad674958d9dd2abda9 (patch) | |
tree | 66299a7b22bc523d230ca93f51b0eae3abca4c59 /t | |
parent | 392533147f50061d93cb9ed82abf98067dde5472 (diff) | |
download | public-inbox-4ff570e5c3cfb33aff3ca6ad674958d9dd2abda9.tar.gz |
Parallelism and interactivity with pager + SIGPIPE needs work; but results are shown and phrase search works without shell users having to apply Xapian quoting rules on top of standard shell quoting.
Diffstat (limited to 't')
-rw-r--r-- | t/lei.t | 11 | ||||
-rw-r--r-- | t/lei_xsearch.t | 5 |
2 files changed, 15 insertions, 1 deletions
@@ -122,7 +122,7 @@ my $setup_publicinboxes = sub { return if $done eq $home; use PublicInbox::InboxWritable; for my $V (1, 2) { - run_script([qw(-init -Lmedium), "-V$V", "t$V", + run_script([qw(-init), "-V$V", "t$V", '--newsgroup', "t.$V", "$home/t$V", "http://example.com/t$V", "t$V\@example.com" ]) or BAIL_OUT "init v$V"; @@ -175,6 +175,15 @@ my $test_external = sub { }); $lei->('ls-external'); like($out, qr/boost=0\n/s, 'ls-external has output'); + + # note, on a Bourne shell users should be able to use either: + # s:"use boolean prefix" + # "s:use boolean prefix" + # or use single quotes, it should not matter. Users only need + # to know shell quoting rules, not Xapian quoting rules. + # No double-quoting should be imposed on users on the CLI + $lei->('q', 's:use boolean prefix'); + like($out, qr/search: use boolean prefix/, 'phrase search got result'); }; my $test_lei_common = sub { diff --git a/t/lei_xsearch.t b/t/lei_xsearch.t index 3774b4c1..8b03c1f2 100644 --- a/t/lei_xsearch.t +++ b/t/lei_xsearch.t @@ -70,4 +70,9 @@ my $max = max(map { $_->{docid} } @msgs); is($lxs->smsg_for(($mset->items)[0])->{docid}, $max, 'got highest docid'); +my @ibxish = $lxs->locals; +is(scalar(@ibxish), scalar(@ibx) + 1, 'got locals back'); +is($lxs->search, $lxs, '->search works'); +is($lxs->over, undef, '->over fails'); + done_testing; |