[perl #72729] TODO for aborted readline() returning '' instead of undef
authorJosh ben Jore <jjore@cpan.org>
Thu, 15 Jul 2010 05:06:16 +0000 (22:06 -0700)
committerJosh ben Jore <jjore@cpan.org>
Thu, 15 Jul 2010 05:55:55 +0000 (22:55 -0700)
t/op/readline.t

index 74fcafc..77a1dcc 100644 (file)
@@ -6,7 +6,7 @@ BEGIN {
     require './test.pl';
 }
 
-plan tests => 20;
+plan tests => 21;
 
 # [perl #19566]: sv_gets writes directly to its argument via
 # TARG. Test that we respect SvREADONLY.
@@ -167,11 +167,12 @@ SKIP: {
     # make the value valid but before it starts read().
     my $once  = test_eintr_readline( $in, 0 );
     my $twice = test_eintr_readline( $in, 1 );
-    is( $once,  "once\n", "readline read first line ok" );
+    is(   $once,  "once\n", "readline read first line ok" );
+    isnt( $twice, "once\n", "readline didn't re-return things when interrupted" );
 
     TODO: {
         local our $TODO = "bad readline returns '', not undef";
-        is( $twice, undef,   "readline didn't return first line again" );
+        is( $twice, undef, "readline returned undef when interrupted" );
     }
 }