Author: jisom
Date: Tue Feb 20 12:22:28 2007
New Revision: 17097

Modified:
   trunk/t/pmc/io.t

Log:
Test that readline on a file without a final newline works properly.


Modified: trunk/t/pmc/io.t
==============================================================================
--- trunk/t/pmc/io.t    (original)
+++ trunk/t/pmc/io.t    Tue Feb 20 12:22:28 2007
@@ -6,7 +6,7 @@
 use warnings;
 use lib qw( . lib ../lib ../../lib );
 use Test::More;
-use Parrot::Test tests => 44;
+use Parrot::Test tests => 45;
 
 =head1 NAME
 
@@ -246,6 +246,22 @@
 2
 OUTPUT
 
+open $FOO, '>', "temp.file" or die "can't open 'temp.file': $!";
+print $FOO "12\n34";
+close $FOO;
+pasm_output_is( <<'CODE', <<'OUTPUT', "open and readline, no final newline" );
+    open P0, "temp.file"
+    set S0, ""
+    set S1, ""
+    readline S0, P0
+    readline S1, P0
+    print S1
+    print S0
+    end
+CODE
+3412
+OUTPUT
+
 open $FOO, '>', "temp.file";    # Clobber previous contents
 close $FOO;
 

Reply via email to