aboutsummaryrefslogtreecommitdiff
path: root/Perl/t/Scale_clipped_group.t
diff options
context:
space:
mode:
authormertz2006-02-12 09:42:23 +0000
committermertz2006-02-12 09:42:23 +0000
commitfb61c8e59c9d86457ddb1e5fa3a2f41e5c4e3534 (patch)
tree5d7ed4d04c758e669706230b3909a35155205888 /Perl/t/Scale_clipped_group.t
parent54270654fc4e4ee572a4b7436d9257e0aa1a129c (diff)
downloadtkzinc-fb61c8e59c9d86457ddb1e5fa3a2f41e5c4e3534.zip
tkzinc-fb61c8e59c9d86457ddb1e5fa3a2f41e5c4e3534.tar.gz
tkzinc-fb61c8e59c9d86457ddb1e5fa3a2f41e5c4e3534.tar.bz2
tkzinc-fb61c8e59c9d86457ddb1e5fa3a2f41e5c4e3534.tar.xz
avoiding bug due to #48 by calling mainloop before any update call
Diffstat (limited to 'Perl/t/Scale_clipped_group.t')
-rw-r--r--Perl/t/Scale_clipped_group.t21
1 files changed, 19 insertions, 2 deletions
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 {