[svn:parrot] r47391 - trunk/t/op

bacek at svn.parrot.org bacek at svn.parrot.org
Sat Jun 5 22:00:07 UTC 2010


Author: bacek
Date: Sat Jun  5 22:00:06 2010
New Revision: 47391
URL: https://trac.parrot.org/parrot/changeset/47391

Log:
Fix test - use FileHandle, _config instead of op sysinfo.

Modified:
   trunk/t/op/sprintf.t

Modified: trunk/t/op/sprintf.t
==============================================================================
--- trunk/t/op/sprintf.t	Sat Jun  5 21:59:27 2010	(r47390)
+++ trunk/t/op/sprintf.t	Sat Jun  5 22:00:06 2010	(r47391)
@@ -59,8 +59,8 @@
 
 .const int TESTS = 308
 
-.loadlib 'sys_ops'
-.loadlib 'io_ops'
+#.loadlib 'sys_ops'
+#.loadlib 'io_ops'
 
 .sub main :main
     load_bytecode 'Test/Builder.pbc'
@@ -124,7 +124,8 @@
 
     # Open the test file
     .local pmc file_handle   # currently open file
-               file_handle = open test_file, 'r'
+               file_handle = new ['FileHandle']
+               file_handle.'open'(test_file, 'r')
 
     unless file_handle goto bad_file
 
@@ -135,7 +136,7 @@
     $I0 = file_handle.'eof'()
     if $I0 goto end_loop
 
-    test_line = readline file_handle
+    test_line = file_handle.'readline'()
 
     # skip lines without tabs, and comment lines
     $I0 = index test_line, "\t"
@@ -232,7 +233,7 @@
 
     goto loop
   end_loop:
-    close file_handle
+    file_handle.'close'()
     goto outer_loop
   end_outer_loop:
 
@@ -485,8 +486,10 @@
     .local pmc it
     it = iter skip_os
 
+    load_bytecode 'config.pbc'
+    $P1 = _config()
     .local string osname
-    osname = sysinfo .SYSINFO_PARROT_OS
+    osname = $P1['osname']
 
   iter_loop:
     unless it goto iter_end


More information about the parrot-commits mailing list