$self->long_response($cb, names2ibx($self, \@names));
}
-sub list_active_i { # "LIST ACTIVE" and also just "LIST" (no args)
+sub _list_active_i { # "LIST ACTIVE" and also just "LIST" (no args)
my ($self, $ibxs) = @_;
my @window = splice(@$ibxs, 0, 1000);
emit_group_lines($self, \@window);
}
sub list_active ($;$) { # called by cmd_list
- _list_groups \&list_active_i, @_;
+ _list_groups \&_list_active_i, @_;
}
-sub list_active_times_i {
+sub _list_active_times_i {
my ($self, $ibxs) = @_;
my @window = splice(@$ibxs, 0, 1000);
$self->msg_more(join('', map {
}
sub list_active_times ($;$) { # called by cmd_list
- _list_groups \&list_active_times_i, @_;
+ _list_groups \&_list_active_times_i, @_;
}
-sub list_newsgroups_i {
+sub _list_newsgroups_i {
my ($self, $ibxs) = @_;
my @window = splice(@$ibxs, 0, 1000);
$self->msg_more(join('', map {
}
sub list_newsgroups ($;$) { # called by cmd_list
- _list_groups \&list_newsgroups_i, @_;
+ _list_groups \&_list_newsgroups_i, @_;
}
# LIST SUBSCRIPTIONS, DISTRIB.PATS are not supported
$arg->($self, @args);
} else {
$self->msg_more("215 list of newsgroups follows\r\n");
- $self->long_response(\&list_active_i, names2ibx($self));
+ $self->long_response(\&_list_active_i, names2ibx($self));
}
}
syswrite($s, "NEWGROUPS\t19990424 000000 \033GMT\007\r\n");
is(0, sysread($s, $buf, 4096), 'GOT EOF on cntrl');
+ # attempt to call _list_*_i subs directly
+ $s = tcp_connect($sock);
+ $buf = readline $s // xbail "readline: $!";
+ like $buf, qr/\A201 .*? ready.*?\r\n/s, 'got greeting';
+ for my $scmd (qw(ACTIVE ACTIVE.TIMES NEWSGROUPS)) {
+ print $s "LIST $scmd.I\r\n" or xbail "print $!";
+ $buf = readline $s // xbail "readline: $!";
+ like $buf, qr/\A501 /, "got 501 on bad command (LIST $scmd.I)";
+ }
+
$s = tcp_connect($sock);
sysread($s, $buf, 4096);
is($buf, "201 " . hostname . " ready - post via email\r\n",
<$fh>;
};
unlike($eout, qr/wide/i, 'no Wide character warnings');
+ unlike $eout, qr/uninitialized/i, 'no uninitialized warnings';
}
$td = undef;