Lib.pm: Skip tests if perl-libintl module is not available.

This commit is contained in:
Richard Jones
2009-07-29 15:49:48 +01:00
committed by Richard Jones
parent 8b854734bd
commit aa999d0586
2 changed files with 23 additions and 2 deletions

View File

@@ -17,7 +17,18 @@
use strict;
use warnings;
use Test::More tests => 1;
BEGIN {
use Test::More;
eval "use Locale::TextDomain";;
if (exists $INC{"Locale/TextDomain.pm"}) {
plan tests => 1;
} else {
plan skip_all => "no perl-libintl module";
exit 0;
}
}
use Sys::Guestfs;
use Sys::Guestfs::Lib;

View File

@@ -17,7 +17,17 @@
use strict;
use warnings;
use Test::More tests => 17;
BEGIN {
use Test::More;
eval "use Locale::TextDomain";;
if (exists $INC{"Locale/TextDomain.pm"}) {
plan tests => 17;
} else {
plan skip_all => "no perl-libintl module";
exit 0;
}
}
use Sys::Guestfs;
use Sys::Guestfs::Lib;