From 7da79391a8345c441a5de145689404f9ac129a97 Mon Sep 17 00:00:00 2001 From: mertz Date: Wed, 12 May 2004 12:33:33 +0000 Subject: modifying some test to take into account differences in $zinc->get(-tile) returned values between perl-tk 800 and perl-tk 804 --- Perl/t/Images.t | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'Perl/t') diff --git a/Perl/t/Images.t b/Perl/t/Images.t index 85b9714..99111c5 100644 --- a/Perl/t/Images.t +++ b/Perl/t/Images.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # -# $Id: Images.t,v 1.4 2004-05-07 13:52:01 mertz Exp $ +# $Id: Images.t,v 1.5 2004-05-12 12:33:33 mertz Exp $ # Author: Christophe Mertz # @@ -60,11 +60,20 @@ like ($xpm, qr/^Tk::Photo=HASH/ , "creating a Tk::Photo with a .xpm"); #### tiling Tk::Zinc $zinc->configure(-tile => $xpm); -is ($zinc->cget(-tile), "QuitPB.xpm", "verifying Tk::Zinc -tile option value"); +if ($Tk::VERSION < 804) { + is ($zinc->cget(-tile), "QuitPB.xpm", "verifying Tk::Zinc -tile option value"); +} else { + is ($zinc->cget(-tile), $xpm, "verifying Tk::Zinc -tile option value"); +} + &wait ("-tile of Tk::Zinc with QuitPB.xpm"); $zinc->configure(-tile => $photoMickey); -is ($zinc->cget(-tile), "mickey.gif", "verifying Tk::Zinc -tile option value"); +if ($Tk::VERSION < 804) { + is ($zinc->cget(-tile), "mickey.gif", "verifying Tk::Zinc -tile option value"); +} else { + is ($zinc->cget(-tile), $photoMickey, "verifying Tk::Zinc -tile option value"); +} &wait ("-tile of Tk::Zinc with mickey.gif"); # modifying the Tk::Photo to see if the Tk::Zinc -tile changes @@ -75,7 +84,11 @@ $photoMickey->read( Tk->findINC("demos/images/mickey.gif") ); &wait ("-tile of Tk::Zinc should display mickey again VISUAL INSPECTION!"); sleep 1; $zinc->configure(-tile => ""); -is ($zinc->cget(-tile), "", "removing Tk::Zinc -tile"); +if ($Tk::VERSION < 804) { + is ($zinc->cget(-tile), "", "removing Tk::Zinc -tile"); +} else { + is ($zinc->cget(-tile), undef, "removing Tk::Zinc -tile"); +} &wait ("-tile of Tk::Zinc with nothing"); -- cgit v1.1