From: Richard Jones Date: Wed, 29 Jul 2009 14:49:48 +0000 (+0100) Subject: Lib.pm: Skip tests if perl-libintl module is not available. X-Git-Tag: 1.0.65~5 X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=commitdiff_plain;h=aa999d0586fd69094cb06ccb3ae5c429649662e0 Lib.pm: Skip tests if perl-libintl module is not available. --- diff --git a/perl/t/500-lib-load.t b/perl/t/500-lib-load.t index 1407169..de928ae 100644 --- a/perl/t/500-lib-load.t +++ b/perl/t/500-lib-load.t @@ -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; diff --git a/perl/t/510-lib-file-arch.t b/perl/t/510-lib-file-arch.t index 14392e8..b0a96e9 100644 --- a/perl/t/510-lib-file-arch.t +++ b/perl/t/510-lib-file-arch.t @@ -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;