[svn:parrot] r47306 - trunk/t/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Wed Jun 2 18:43:10 UTC 2010
Author: NotFound
Date: Wed Jun 2 18:43:10 2010
New Revision: 47306
URL: https://trac.parrot.org/parrot/changeset/47306
Log:
avoid using stat in thaw tests and fix some other minor problems
Modified:
trunk/t/pmc/eval.t
Modified: trunk/t/pmc/eval.t
==============================================================================
--- trunk/t/pmc/eval.t Wed Jun 2 17:54:06 2010 (r47305)
+++ trunk/t/pmc/eval.t Wed Jun 2 18:43:10 2010 (r47306)
@@ -404,11 +404,9 @@
.local string file
.local int size
file = "$temp_file"
- .include "stat.pasm"
- size = stat file, .STAT_FILESIZE
io = new ['FileHandle']
- io.'open'(file, 'r')
- \$S0 = read io, size
+ io.'open'(file, 'rb')
+ \$S0 = io.'readall'()
io.'close'()
e = thaw \$S0
sweep 1 # ensure all of the object survives GC
@@ -428,7 +426,7 @@
f = compi("foo_1", "hello from foo_1")
\$S0 = freeze f
io = new ['FileHandle']
- io.'open'("$temp_file", 'w')
+ io.'open'("$temp_file", 'wb')
print io, \$S0
io.'close'()
say "written"
@@ -464,10 +462,9 @@
.local string file
.local int size
file = "$temp_file"
- .include "stat.pasm"
- size = stat file, .STAT_FILESIZE
- io.'open'(file, 'r')
- \$S0 = read io, size
+ io = new ['FileHandle']
+ io.'open'(file, 'rb')
+ \$S0 = io.'readall'()
io.'close'()
e = thaw \$S0
e()
More information about the parrot-commits
mailing list