Factor out author count anouncement, making it seen on plain installs
[dbsrgits/DBIx-Class.git] / xt / authors.t
index 5eb533b..e5bc2cd 100644 (file)
@@ -19,9 +19,15 @@ my @known_authors = do {
 } or die "Known AUTHORS file seems empty... can't happen...";
 
 is_deeply (
-  [ grep { /^\s/ } @known_authors ],
+  [ grep { /^\s/ or /\s\s/ } @known_authors ],
   [],
-  "No entries with leading space",
+  "No entries with leading or doubled space",
+);
+
+is_deeply (
+  [ grep { / \:[^\s\/] /x or /^ [^:]*? \s+ \: /x } @known_authors ],
+  [],
+  "No entries with malformed nicks",
 );
 
 is_deeply (
@@ -32,27 +38,18 @@ is_deeply (
 
 my $email_re = qr/( \< [^\<\>]+ \> ) $/x;
 
-my (%known_authors, $count);
+my %known_authors;
 for (@known_authors) {
   my ($name_email) = m/ ^ (?: [^\:]+ \: \s )? (.+) /x;
   my ($email) = $name_email =~ $email_re;
 
-  if (
+  fail "Duplicate found: $name_email" if (
     $known_authors{$name_email}++
       or
     ( $email and $known_authors{$email}++ )
-  ) {
-    fail "Duplicate found: $name_email";
-  }
-  else {
-    $count++;
-  }
+  );
 }
 
-# do not announce anything under travis - we are watching for STDERR silence
-diag "\n\n$count contributors made this library what it is today\n\n"
-  unless ($ENV{TRAVIS}||'') eq 'true';
-
 # augh taint mode
 if (length $ENV{PATH}) {
   ( $ENV{PATH} ) = join ( $Config{path_sep},