summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormertz2002-10-29 08:16:27 +0000
committermertz2002-10-29 08:16:27 +0000
commit2e463fdab0ad1665bb9f2af4c6fec9b6937de11f (patch)
tree3d7afd478ea49fd205d083b413151602bd22b6f2
parent49f2a37bb15f0d87aa132a48d430e75bf86bac28 (diff)
downloadivy-perl-2e463fdab0ad1665bb9f2af4c6fec9b6937de11f.zip
ivy-perl-2e463fdab0ad1665bb9f2af4c6fec9b6937de11f.tar.gz
ivy-perl-2e463fdab0ad1665bb9f2af4c6fec9b6937de11f.tar.bz2
ivy-perl-2e463fdab0ad1665bb9f2af4c6fec9b6937de11f.tar.xz
ajout de qqs fichiers de test (qui mettaient en évidence des bugs
corrigés en version 4.11)
-rwxr-xr-xtest/Ivy::exit-bug.pl35
-rwxr-xr-xtest/Ivy::exit.pl28
-rw-r--r--test/Ivy::exit2-bug.pl36
3 files changed, 99 insertions, 0 deletions
diff --git a/test/Ivy::exit-bug.pl b/test/Ivy::exit-bug.pl
new file mode 100755
index 0000000..0f7942d
--- /dev/null
+++ b/test/Ivy::exit-bug.pl
@@ -0,0 +1,35 @@
+#!/usr/bin/perl -w
+
+#use lib '/home/mertz/CODE/lib/ivy-perl';
+#BEGIN { print "INC = @INC\n";}
+use strict;
+
+use Tk;
+use Ivy;
+#print "INC = @INC\n";
+Ivy->init('-loopMode' => 'TK', '-appName' => 'toto');
+my $ivy = Ivy->new();
+$SIG{HUP} = $SIG{TERM} = $SIG{QUIT} = $SIG{INT} = $SIG{STOP} = $SIG{KILL} = 'quit3';
+
+my $mw = MainWindow->new;
+my $b = $mw->Button(-text => 'Un bouton', -command => \&quit)->pack();
+$ivy->start;
+MainLoop;
+
+sub quit {
+ #$b->destroy;
+ #$mw->destroy;
+ Ivy::exit(); # fait un segmentation fault si Ctrl+C et qu'il est seul sur le bus!
+ #print "Apres Ivy::stop\n";
+ #Tk::exit();
+}
+
+sub quit2 { # fait un segmentation fault si Ctrl+C et qu'il est seul sur le bus!
+ Ivy::stop ();
+ Tk::exit ();
+}
+sub quit3 {
+ Ivy::exit(); # fait un segmentation fault si Ctrl+C
+}
+
+1;
diff --git a/test/Ivy::exit.pl b/test/Ivy::exit.pl
new file mode 100755
index 0000000..a9b31a0
--- /dev/null
+++ b/test/Ivy::exit.pl
@@ -0,0 +1,28 @@
+#!/usr/bin/perl -w
+
+#use lib '/home/mertz/CODE/lib/ivy-perl';
+#BEGIN { print "INC = @INC\n";}
+use strict;
+
+use Tk;
+use Ivy;
+#print "INC = @INC\n";
+Ivy->init('-loopMode' => 'TK', '-appName' => 'toto');
+my $ivy = Ivy->new();
+$SIG{HUP} = $SIG{TERM} = $SIG{QUIT} = $SIG{INT} = $SIG{STOP} = $SIG{KILL} = 'quit';
+
+my $mw = MainWindow->new;
+my $b = $mw->Button(-text => 'Un bouton', -command => \&quit)->pack();
+$ivy->start;
+Tk::MainLoop;
+
+sub quit {
+ #$b->destroy;
+ #$mw->destroy;
+ print "Avant Ivy::stop\n";
+ Ivy::exit();
+ #print "Apres Ivy::stop\n";
+ #Tk::exit();
+}
+
+1;
diff --git a/test/Ivy::exit2-bug.pl b/test/Ivy::exit2-bug.pl
new file mode 100644
index 0000000..46466d1
--- /dev/null
+++ b/test/Ivy::exit2-bug.pl
@@ -0,0 +1,36 @@
+#!/usr/bin/perl -w
+
+#use lib '/home/mertz/CODE/lib/ivy-perl';
+#BEGIN { print "INC = @INC\n";}
+use strict;
+
+use Tk;
+use Ivy;
+print "Ivy::exit2-bug.pl INC = @INC\n";
+Ivy->init('-loopMode' => 'TK', '-appName' => 'toto');
+my $ivy = Ivy->new();
+$SIG{HUP} = $SIG{TERM} = $SIG{QUIT} = $SIG{INT} = $SIG{STOP} = $SIG{KILL} = 'quit2';
+
+my $mw = MainWindow->new;
+my $b = $mw->Button(-text => 'Un bouton', -command => \&quit)->pack();
+$ivy->start;
+MainLoop;
+
+sub quit {
+ #$b->destroy;
+ #$mw->destroy;
+ print "Avant Ivy::exit\n";
+ $ivy->exit(); # fait un segmentation fault si Ctrl+C et qu'il est seul sur le bus!
+ print "Apres Ivy::exit\n";
+}
+
+sub quit2 { # fait un segmentation fault si Ctrl+C et qu'il est seul sur le bus!
+ exit ();
+}
+
+
+sub quit3 {
+ Ivy::exit(); # fait un segmentation fault si Ctrl+C
+}
+
+1;