cvsuser 03/07/09 12:27:05
Modified: . io.ops
t/pmc io.t
Log:
Fix printerr op, add test
Revision Changes Path
1.26 +1 -1 parrot/io.ops
Index: io.ops
===================================================================
RCS file: /cvs/public/parrot/io.ops,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -w -r1.25 -r1.26
--- io.ops 8 Jul 2003 13:01:21 -0000 1.25
+++ io.ops 9 Jul 2003 19:27:02 -0000 1.26
@@ -220,7 +220,7 @@
=cut
op printerr(in INT) {
- PIO_eprintf(interpreter, INTVAL_FMT, (double)$1);
+ PIO_eprintf(interpreter, INTVAL_FMT, $1);
goto NEXT();
}
1.5 +19 -2 parrot/t/pmc/io.t
Index: io.t
===================================================================
RCS file: /cvs/public/parrot/t/pmc/io.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -r1.4 -r1.5
--- io.t 9 Jul 2003 08:33:17 -0000 1.4
+++ io.t 9 Jul 2003 19:27:05 -0000 1.5
@@ -1,6 +1,6 @@
#! perl -w
-use Parrot::Test tests => 16;
+use Parrot::Test tests => 17;
use Test::More;
output_is(<<'CODE', <<'OUTPUT', "open/close");
@@ -239,4 +239,21 @@
print I2
end
CODE
-unlink("temp.file");
+
+output_is(<<'CODE', <<'OUTPUT', 'printerr');
+ new P0, .PerlString
+ set P0, "This is a test\n"
+ printerr 10
+ printerr "\n"
+ printerr 1.0
+ printerr "\n"
+ printerr "foo"
+ printerr "\n"
+ printerr P0
+ end
+CODE
+10
+1.000000
+foo
+This is a test
+OUTPUT