This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
porting/utils.t: explain what caused failures
authorDavid Mitchell <davem@iabyn.com>
Wed, 10 Dec 2014 11:58:26 +0000 (11:58 +0000)
committerDavid Mitchell <davem@iabyn.com>
Wed, 10 Dec 2014 12:20:17 +0000 (12:20 +0000)
On an error, include in the diagnostic output what perl command we were
running that triggered the failure.

t/porting/utils.t

index 7ff13cf..2fe9075 100644 (file)
@@ -86,7 +86,8 @@ foreach my $victim (@victims) {
             if $excuses{$victim};
 
         my $got = runperl(switches => ['-c'], progfile => $victim, stderr => 1, nolib => 1);
-        is($got, "$victim syntax OK\n", "$victim compiles");
+        is($got, "$victim syntax OK\n", "$victim compiles")
+            or diag("when executing perl with '-c $victim'");
     }
 }