perl-Gtk2 r2150 - in trunk: . t



Author: tsch
Date: Sun Feb 22 17:33:48 2009
New Revision: 2150
URL: http://svn.gnome.org/viewvc/perl-Gtk2?rev=2150&view=rev

Log:
Skip most tests if we can't find a key entry to test against.


Modified:
   trunk/ChangeLog
   trunk/t/GdkKeys.t

Modified: trunk/t/GdkKeys.t
==============================================================================
--- trunk/t/GdkKeys.t	(original)
+++ trunk/t/GdkKeys.t	Sun Feb 22 17:33:48 2009
@@ -18,6 +18,11 @@
 }
 
 my @keys = $map -> get_entries_for_keyval($Gtk2::Gdk::Keysyms{ Escape });
+
+SKIP: {
+skip 'No key entries for Escape found in the keymap', 41
+  unless scalar @keys;
+
 isa_ok($keys[0], "HASH");
 like($keys[0] -> { keycode }, qr/^\d+$/);
 like($keys[0] -> { group }, qr/^\d+$/);
@@ -98,6 +103,8 @@
 my $unicode = Gtk2::Gdk -> keyval_to_unicode($a);
 is(Gtk2::Gdk -> unicode_to_keyval($unicode), $a);
 
+}
+
 __END__
 
 Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for the



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]