[perl-Gtk3] Fix a test failure when no display is available
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk3] Fix a test failure when no display is available
- Date: Tue, 22 Sep 2015 20:22:17 +0000 (UTC)
commit 3c70e00cb77afe0e9659ea599b41b2c45f1da514
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Tue Sep 22 22:17:11 2015 +0200
Fix a test failure when no display is available
The test t/vfuncs-double-setup.t unconditionally called Gtk3::init.
t/vfuncs-double-setup.t | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/t/vfuncs-double-setup.t b/t/vfuncs-double-setup.t
index 1f4b084..4a4811b 100644
--- a/t/vfuncs-double-setup.t
+++ b/t/vfuncs-double-setup.t
@@ -22,17 +22,18 @@ use strict;
use warnings;
# Second import.
-use Gtk3 -init;
+use Gtk3;
use Test::More;
if (!eval { Glib::Object::Introspection->VERSION ('0.030') }) {
plan skip_all => 'G:O:I 0.030 required';
-} else {
- plan tests => 1;
}
+if (!Gtk3::init_check ()) {
+ plan skip_all => 'Gtk3::init_check failed';
+}
+plan tests => 1;
-my $window = Gtk3::Window->new();
-$window->signal_connect(delete_event => sub { Gtk3->main_quit() });
-my $my_button = MyButton->new(label => "Test");
-$window->add($my_button);
+my $window = Gtk3::Window->new;
+my $my_button = MyButton->new (label => "Test");
+$window->add ($my_button); # trigger PARENT_SET
pass;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]