summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Jones <rjones@centos5x32.home.annexia.org>2009-07-29 15:49:48 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-07-29 15:51:14 +0100
commitaa999d0586fd69094cb06ccb3ae5c429649662e0 (patch)
treea258f7b0b22529d483479509e254cd57fe005f26
parent8b854734bd13b7f68b72422932de3bf24c84ca15 (diff)
downloadlibguestfs-aa999d0586fd69094cb06ccb3ae5c429649662e0.tar.gz
libguestfs-aa999d0586fd69094cb06ccb3ae5c429649662e0.tar.xz
libguestfs-aa999d0586fd69094cb06ccb3ae5c429649662e0.zip
Lib.pm: Skip tests if perl-libintl module is not available.
-rw-r--r--perl/t/500-lib-load.t13
-rw-r--r--perl/t/510-lib-file-arch.t12
2 files changed, 23 insertions, 2 deletions
diff --git a/perl/t/500-lib-load.t b/perl/t/500-lib-load.t
index 14071695..de928aed 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 14392e89..b0a96e9f 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;