return $c->code;
}
+sub Net::NNTP::must {
+ my ($c, $cmd, $test, @valid) = @_;
+ $c->command($cmd);
+ $c->response();
+ ok(scalar (grep {$c->code == $_} @valid) , "$test ".$c->code." in (@valid)");
+ if (scalar (grep {$c->code == $_} @valid)) {
+ return $c->code;
+ }
+ die $c->code;
+}
+
# 3977:5.1.1 initial greeting must be 200 201 400 502
my @valid = (200, 201, 400, 502);
my $greeting = $c->code;
# 4 tests done to here
$c->try('STAT','stat with no newsgroup',412);
-$c->try('GROUP de.test','group selection',211);
-$c->try('STAT','stat with newsgroup',223,420);
+
+eval {
+ $c->must('GROUP de.test','group selection',211);
+};
+SKIP: {
+ skip "group failed, can't stat", 1 if $@;
+ $c->try('STAT','stat with newsgroup',223,420);
+}
goto quit;