[perl-Gtk3] Bail out of testing early if Gtk3 cannot be loaded
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk3] Bail out of testing early if Gtk3 cannot be loaded
- Date: Sat, 9 Jun 2012 15:00:51 +0000 (UTC)
commit 6513f2f6e17fa4fb7f0967dc7fd54be1735f9c98
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Sat Jun 9 16:59:45 2012 +0200
Bail out of testing early if Gtk3 cannot be loaded
This usually happens when Gtk-3.0.typelib cannot be found, which is a common
situation on CPAN tester machines, it seems.
t/00-init.t | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/t/00-init.t b/t/00-init.t
index e0cf95b..edac9be 100644
--- a/t/00-init.t
+++ b/t/00-init.t
@@ -3,9 +3,14 @@
use strict;
use warnings;
-use Test::More tests => 2;
+use Test::More;
-BEGIN { use_ok('Gtk3') };
+BEGIN { require Gtk3; }
+my $success = eval { Gtk3->import; 1 };
+BAIL_OUT ("Cannot load Gtk3: $@")
+ unless $success;
+
+plan tests => 1;
SKIP: {
@ARGV = qw(--help --name gtk2perl --urgs tree);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]