aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Perl/t/Images.t18
1 files changed, 16 insertions, 2 deletions
diff --git a/Perl/t/Images.t b/Perl/t/Images.t
index 6dbd88b..058b2c8 100644
--- a/Perl/t/Images.t
+++ b/Perl/t/Images.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
#
-# $Id: Images.t,v 1.7 2005-06-27 13:34:02 mertz Exp $
+# $Id: Images.t,v 1.8 2006-02-12 09:40:55 mertz Exp $
# Author: Christophe Mertz
#
@@ -48,6 +48,16 @@ $zinc = $mw->Zinc(-render => 1,
like ($zinc, qr/^Tk::Zinc=HASH/ , "zinc has been created");
+## 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 {
+
#### creating different images, bitmaps and pixmaps...
my $photoMickey = $zinc->Photo('mickey.gif', -file => Tk->findINC("demos/images/mickey.gif"));
like ($photoMickey, qr/^Tk::Photo=HASH/ , "creating a Tk::Photo with a .gif");
@@ -212,6 +222,11 @@ $zinc->remove($icon3);
# We should also test that changing the content of a Tk::Photo should change the display of an icon
+diag("############## Images test");
+exit;
+
+}
+
sub wait {
$zinc->update;
@@ -231,4 +246,3 @@ sub wait {
-diag("############## Images test");