diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-04-03 11:09:11 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-04-03 12:06:15 +0000 |
commit | 445d2062a60959a04b55d7d1fe4439eff23cd44d (patch) | |
tree | 653eea288da968a04561224bc1ba079ed644ded3 /t | |
parent | 0dceebd0a85774c92af247e6da5e2f5a0ee8417c (diff) | |
download | public-inbox-445d2062a60959a04b55d7d1fe4439eff23cd44d.tar.gz |
id_batch had a an overly complicated interface, replace it with id_batch which is simpler and takes advantage of selectcol_arrayref in DBI. This allows simplification of callers and the diffstat agrees with me.
Diffstat (limited to 't')
-rw-r--r-- | t/nntpd.t | 1 | ||||
-rw-r--r-- | t/v2writable.t | 7 |
2 files changed, 8 insertions, 0 deletions
@@ -123,6 +123,7 @@ EOF my $list = $n->list; is_deeply($list, { $group => [ qw(1 1 n) ] }, 'LIST works'); is_deeply([$n->group($group)], [ qw(0 1 1), $group ], 'GROUP works'); + is_deeply($n->listgroup($group), [1], 'listgroup OK'); %opts = ( PeerAddr => $host_port, diff --git a/t/v2writable.t b/t/v2writable.t index 1e8e4042..62947351 100644 --- a/t/v2writable.t +++ b/t/v2writable.t @@ -189,6 +189,13 @@ EOF is($nn{$mid}++, 0, "MID is unique in NEWNEWS"); } is_deeply([sort keys %nn], [sort keys %uniq]); + + my %lg; + foreach my $num (@{$n->listgroup($group)}) { + is($lg{$num}++, 0, "num is unique in LISTGROUP"); + } + is_deeply([sort keys %lg], [sort keys %$x], + 'XOVER and LISTGROUPS return the same article numbers'); }; { local $ENV{NPROC} = 2; |