]> git.vpit.fr Git - perl/modules/Acme-CPANAuthors-You-re_using.git/blob - t/10-base.t
Test for GAAS instead of LBROCARD
[perl/modules/Acme-CPANAuthors-You-re_using.git] / t / 10-base.t
1 #!perl
2
3 use strict;
4 use warnings;
5
6 use Test::More;
7
8 use Acme::CPANAuthors;
9
10 my $authors = eval {
11  local $SIG{__WARN__} = sub {
12   my ($msg) = @_;
13   if ($msg =~ /^You're_using CPAN Authors are not registered yet: (.*)/s) {
14    die $1;
15   }
16   CORE::warn(@_);
17  };
18  Acme::CPANAuthors->new("You're_using");
19 };
20
21 if ($authors) {
22  plan tests => 5;
23 } else {
24  plan skip_all => $@;
25 }
26
27 my $count = $authors->count;
28 diag "$count authors found";
29 cmp_ok $count, '>', 0, 'there are some authors';
30
31 is   $authors->name('???'),      undef,         'wrong name';
32 is   $authors->name('VPIT'),     'Vincent Pit', 'we should at least have this module';
33 isnt $authors->name('ISHIGAKI'), undef,         'we should at least have Acme::CPANAuthors\' author';
34 isnt $authors->name('GAAS'),     undef,         'we should at least have LWP\'s author';