diff options
author | Eric Wong <e@80x24.org> | 2021-09-21 07:41:49 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-21 19:18:34 +0000 |
commit | 0c385e6500f26babc47a0768b730ea38e290a5f5 (patch) | |
tree | 2e5ae0f665c10a47e7d532fe04fb2a58c0c75d52 /t | |
parent | eed4017d3361220e7533d786565c3633e305cc16 (diff) | |
download | public-inbox-0c385e6500f26babc47a0768b730ea38e290a5f5.tar.gz |
No reason not to support them, since there's more public-inbox-nntpd instances than -imapd instances, currently.
Diffstat (limited to 't')
-rw-r--r-- | t/lei-import-nntp.t | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/t/lei-import-nntp.t b/t/lei-import-nntp.t index df0594d4..0b080781 100644 --- a/t/lei-import-nntp.t +++ b/t/lei-import-nntp.t @@ -49,6 +49,15 @@ test_lei({ tmpdir => $tmpdir }, sub { my $end = $high - 1; lei_ok qw(import), "$url/$high"; + lei_ok('inspect', $url); is_xdeeply(json_utf8->decode($lei_out), { + $url => { 'article.count' => 1, + 'article.min' => $high, + 'article.max' => $high, } + }, 'inspect output for URL after single message') or diag $lei_out; + lei_ok('inspect', "$url/$high"); + my $x = json_utf8->decode($lei_out); + like($x->{$url}->{$high}, qr/\A[a-f0-9]{40,}\z/, 'inspect shows blob'); + lei_ok 'ls-mail-sync'; is($lei_out, "$url\n", 'article number not stored as folder'); lei_ok qw(q z:0..); my $one = json_utf8->decode($lei_out); @@ -57,6 +66,18 @@ test_lei({ tmpdir => $tmpdir }, sub { local $ENV{HOME} = "$tmpdir/h3"; lei_ok qw(import), "$url/$low-$end"; + lei_ok('inspect', $url); is_xdeeply(json_utf8->decode($lei_out), { + $url => { 'article.count' => $end - $low + 1, + 'article.min' => $low, + 'article.max' => $end, } + }, 'inspect output for URL after range') or diag $lei_out; + lei_ok('inspect', "$url/$low-$end"); + $x = json_utf8->decode($lei_out); + is_deeply([ ($low..$end) ], [ sort { $a <=> $b } keys %{$x->{$url}} ], + 'inspect range shows range'); + is(scalar(grep(/\A[a-f0-9]{40,}\z/, values %{$x->{$url}})), + $end - $low + 1, 'all values are git blobs'); + lei_ok 'ls-mail-sync'; is($lei_out, "$url\n", 'article range not stored as folder'); lei_ok qw(q z:0..); my $start = json_utf8->decode($lei_out); |