[perl-Gtk2] Fix the number of tests run



commit 4d628aa0f7e93cdd21e1226cdb2dab0674efa6fb
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sun May 17 16:04:24 2009 +0200

    Fix the number of tests run
    
    Properly remove an idle handler after it has run once so that the number of
    tests run is predictable.  Also correct a version number in a skip statement.
---
 t/GtkPrintOperation.t |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/t/GtkPrintOperation.t b/t/GtkPrintOperation.t
index 83cc47d..294c2d8 100644
--- a/t/GtkPrintOperation.t
+++ b/t/GtkPrintOperation.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 use strict;
 use Gtk2::TestHelper
-  tests => 13,
+  tests => 12,
   at_least_version => [2, 10, 0, "GtkPrintOperation is new in 2.10"];
 
 # $Id$
@@ -54,7 +54,7 @@ $op -> cancel();
 
 SKIP: {
   skip 'draw page finish (2.16)', 3
-    unless Gtk2->CHECK_VERSION(2, 15, 0);
+    unless Gtk2->CHECK_VERSION(2, 16, 0);
 
   # NOTE draw_page_finish() has to be called under the right conditions
   #      otherwise the print context doesn't seem to be setup properly causing
@@ -72,8 +72,9 @@ SKIP: {
 
     # Finish the drawing latter
     Glib::Idle->add(sub {
-      ok(TRUE, "Draw page finish called"); # Called 2 times
+      ok(TRUE, "Draw page finish called");
       $op -> draw_page_finish();
+      return Glib::SOURCE_REMOVE;
     });
   });
 



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