[perl-Pango] Do not fail tests when there is no display
- From: Torsten Schönfeld <tsch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [perl-Pango] Do not fail tests when there is no display
- Date: Fri, 21 Aug 2009 23:40:45 +0000 (UTC)
commit 54fc4428100745e2332159feccf81a9f83952533
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Sat Aug 22 01:39:37 2009 +0200
Do not fail tests when there is no display
When no display is available, skip all tests that require Gtk2.
t/inc/PangoTestHelper.pm | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/t/inc/PangoTestHelper.pm b/t/inc/PangoTestHelper.pm
index 95ea270..3bdf927 100644
--- a/t/inc/PangoTestHelper.pm
+++ b/t/inc/PangoTestHelper.pm
@@ -9,8 +9,9 @@ sub import {
my %options = @_;
if ($options{need_gtk}) {
- unless (eval "use Gtk2 $REQ_GTK2_VERSION -init; 1;") {
- plan skip_all => "This test needs Gtk2 >= $REQ_GTK2_VERSION";
+ unless (eval "use Gtk2 $REQ_GTK2_VERSION; Gtk2->init_check;") {
+ plan skip_all =>
+ "This test needs Gtk2 >= $REQ_GTK2_VERSION and a display";
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]