[svn:parrot] r47405 - trunk/t/pmc
bacek at svn.parrot.org
bacek at svn.parrot.org
Sat Jun 5 23:22:54 UTC 2010
Author: bacek
Date: Sat Jun 5 23:22:54 2010
New Revision: 47405
URL: https://trac.parrot.org/parrot/changeset/47405
Log:
Move filehandle test into t/pmc/filehandle.t
Modified:
trunk/t/pmc/filehandle.t
trunk/t/pmc/io.t
Modified: trunk/t/pmc/filehandle.t
==============================================================================
--- trunk/t/pmc/filehandle.t Sat Jun 5 23:20:05 2010 (r47404)
+++ trunk/t/pmc/filehandle.t Sat Jun 5 23:22:54 2010 (r47405)
@@ -7,7 +7,7 @@
use lib qw( . lib ../lib ../../lib );
use Test::More;
-use Parrot::Test tests => 18;
+use Parrot::Test tests => 19;
use Parrot::Test::Util 'create_tempfile';
use Parrot::Test::Util 'create_tempfile';
@@ -644,6 +644,25 @@
expect 1 exit status: 1
OUTPUT
+pir_output_is( sprintf(<<'CODE', $temp_file), <<'OUTPUT', "timely destruction", todo => 'TT #1659' );
+.const string temp_file = '%s'
+.sub main :main
+ interpinfo $I0, 2 # GC mark runs
+ $P0 = new ['FileHandle']
+ $P0.'open'(temp_file, 'w')
+ needs_destroy $P0
+ print $P0, "a line\n"
+ null $P0 # kill it
+ sweep 0 # a lazy GC has to close the PIO
+ $P0 = new ['FileHandle']
+ $P0.'open'(temp_file, 'r')
+ $S0 = $P0.'read'(20)
+ print $S0
+.end
+CODE
+a line
+OUTPUT
+
# TT #1178
# L<PDD22/I\/O PMC API/=item get_fd>
# NOTES: this is going to be platform dependent
Modified: trunk/t/pmc/io.t
==============================================================================
--- trunk/t/pmc/io.t Sat Jun 5 23:20:05 2010 (r47404)
+++ trunk/t/pmc/io.t Sat Jun 5 23:22:54 2010 (r47405)
@@ -7,7 +7,7 @@
use lib qw( . lib ../lib ../../lib );
use Test::More;
-use Parrot::Test tests => 43;
+use Parrot::Test tests => 42;
use Parrot::Test::Util 'create_tempfile';
use Parrot::Test::Util 'create_tempfile';
@@ -73,25 +73,6 @@
a line
OUTPUT
-pir_output_is( sprintf(<<'CODE', $temp_file), <<'OUTPUT', "timely destruction", todo => 'TT #1659' );
-.const string temp_file = '%s'
-.sub main :main
- interpinfo $I0, 2 # GC mark runs
- $P0 = new ['FileHandle']
- $P0.'open'(temp_file, 'w')
- needs_destroy $P0
- print $P0, "a line\n"
- null $P0 # kill it
- sweep 0 # a lazy GC has to close the PIO
- $P0 = new ['FileHandle']
- $P0.'open'(temp_file, 'r')
- $S0 = $P0.'read'(20)
- print $S0
-.end
-CODE
-a line
-OUTPUT
-
my (undef, $no_such_file) = create_tempfile( UNLINK => 1, OPEN => 0 );
pir_output_is( sprintf( <<'CODE', $no_such_file, $temp_file ), <<'OUTPUT', "get_bool" );
More information about the parrot-commits
mailing list