]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/commitdiff
Don't output the plan twice when no XS can be found, and output the reason from the...
authorVincent Pit <vince@profvince.com>
Sun, 28 Sep 2008 00:41:17 +0000 (02:41 +0200)
committerVincent Pit <vince@profvince.com>
Sun, 28 Sep 2008 00:41:17 +0000 (02:41 +0200)
t/30-bad.t

index 0ac01296e5d79285d479b170640ccffb3b1cd825..34e41b7569772064c5ac5a3447bc017a7f4ee6cf 100644 (file)
@@ -19,7 +19,10 @@ sub tester {
    XSLoader::load('Test::Valgrind', \$Test::Valgrind::VERSION);
   ";
   if ($@) {
+   my $err = $@;
    $dbg = 0;
+   chomp $err;
+   diag "XS test code not available ($err)";
   } else {
    my $ret = eval "Test::Valgrind::DEBUGGING()";
    $dbg = $@ ? 0 : $ret;
@@ -54,10 +57,7 @@ if ($@) {
   require XSLoader;
   XSLoader::load('Test::Valgrind', \$Test::Valgrind::VERSION);
  ";
- if ($@) {
-  diag $@;
-  plan skip_all => "XS test code not available";
- } else {
+ unless ($@) {
   Test::Valgrind::leak();
  }
 }