From fb61c8e59c9d86457ddb1e5fa3a2f41e5c4e3534 Mon Sep 17 00:00:00 2001 From: mertz Date: Sun, 12 Feb 2006 09:42:23 +0000 Subject: avoiding bug due to #48 by calling mainloop before any update call --- Perl/t/Scale_clipped_group.t | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'Perl/t/Scale_clipped_group.t') diff --git a/Perl/t/Scale_clipped_group.t b/Perl/t/Scale_clipped_group.t index 37c5183..03e571f 100644 --- a/Perl/t/Scale_clipped_group.t +++ b/Perl/t/Scale_clipped_group.t @@ -1,5 +1,7 @@ +#!/usr/bin/perl -w + # -# $Id: Scale_clipped_group.t,v 1.1 2005-06-23 18:11:10 mertz Exp $ +# $Id: Scale_clipped_group.t,v 1.2 2006-02-12 09:42:23 mertz Exp $ # Author: Christophe Mertz mertz@intuilab.com, adapted from a script # reported by Daniel Etienne for a bug report in Tk::Zinc 3.2.96 # @@ -67,8 +69,23 @@ my $icon2 = $zinc->add("icon", $subGroup2, ## scaling fatherGroup1 makes an image visible on 3.2.96/3.3.2 TkZinc version $zinc->scale($fatherGroup1, 0.8, 0.8); +## test cannot be run directly since $zinc->update does not work properly +## when not in a mainloop +## so I use a timer to trigger tests after entering the mainloop + +$zinc->after(10, \&testExecute); + +Tk::MainLoop; + +sub testExecute { -&wait ("You should see ONLY ONE ptk ICON (a camel), please INSPECT VISUALY!"); sleep 2; + + &wait ("You should see ONLY ONE ptk ICON (a camel), please INSPECT VISUALY!"); sleep 2; + + diag("############## Scale clipped group test"); + exit; + +} sub wait { -- cgit v1.1