summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Signes <rjbs@cpan.org>2012-03-10 12:14:42 -0500
committerKarl Williamson <public@khwilliamson.com>2012-03-16 14:28:43 -0600
commit8dabe762d4751e5bae0ed9581193c25962d955ef (patch)
tree9d61cbba7aba3c4d016cb199acbaead1e7bfb839
parent868894da8a58aa346fb568f1cff58e8640576895 (diff)
downloadperl-8dabe762d4751e5bae0ed9581193c25962d955ef.tar.gz
new patch for Term::ReadLine event loop support
https://rt.perl.org/rt3/Ticket/Display.html?id=108470 This is more work from Darin McBride and Rocco Caputo to get the event loop code offered earlier working, tested, and documented.
-rw-r--r--dist/Term-ReadLine/t/Tk.t42
1 files changed, 0 insertions, 42 deletions
diff --git a/dist/Term-ReadLine/t/Tk.t b/dist/Term-ReadLine/t/Tk.t
deleted file mode 100644
index e2412248f4..0000000000
--- a/dist/Term-ReadLine/t/Tk.t
+++ /dev/null
@@ -1,42 +0,0 @@
-#!perl
-
-use Test::More;
-
-eval "use Tk; 1" or
- plan skip_all => "Tk is not installed.";
-
-# seeing as the entire point of this test is to test the event handler,
-# we need to mock as little as possible. To keep things tightly controlled,
-# we'll use the Stub directly.
-BEGIN {
- $ENV{PERL_RL} = 'Stub o=0';
-}
-
-my $mw;
-eval {
- use File::Spec;
- $mw = MainWindow->new(); $mw->withdraw();
- 1;
-} or plan skip_all => "Tk can't start. DISPLAY not set?";
-
-# need to delay this so that Tk is loaded first.
-require Term::ReadLine;
-
-plan tests => 3;
-
-my $t = Term::ReadLine->new('Tk');
-ok($t, "Created object");
-is($t->ReadLine, 'Term::ReadLine::Stub', 'Correct type');
-$t->tkRunning(1);
-
-my $text = 'some text';
-my $T = $text . "\n";
-
-my $w = Tk::after($mw,0,
- sub {
- pass("Event loop called");
- exit 0;
- });
-
-my $result = $t->readline('Do not press enter>');
-fail("Should not get here.");