Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix and fudge io.t

  • Loading branch information...
commit e52f458d90b2638069881b78c6f21816d04c85e0 1 parent 1a2d51f
@moritz moritz authored
View
1  S02-builtin_data_types/instants-and-durations.t
@@ -30,7 +30,6 @@ isa_ok eval('now +300'), Instant, 'now is a term, not a function';
isa_ok $d + $t0, Instant, 'Instant + Duration ~~ Instant';
isa_ok $d + $t0, Instant, 'Duration + Instant ~~ Instant';
isa_ok $t0 - $d, Instant, 'Instant - Duration ~~ Instant';
- #?rakudo todo 'nom regression'
is $t0 + ($t1 - $t0), $t1, 'Instant A + (Instant B - Instant A) == Instant B';
}
View
23 S16-filehandles/io.t
@@ -13,7 +13,7 @@ I/O tests
=end pod
-plan 90;
+plan 81;
#?pugs emit if $*OS eq "browser" {
#?pugs emit skip_rest "Programs running in browsers don't have access to regular IO.";
@@ -89,6 +89,7 @@ is(@lines4[0], "Hello World", 'lines($in) worked in list context');
is(@lines4[1], "Foo Bar Baz", 'lines($in) worked in list context');
is(@lines4[2], "The End", 'lines($in) worked in list context');
is(@lines4[3], "... Its not over yet!", 'lines($in) worked in list context');
+#?rakudo skip 'nom regression'
ok($in4.close, 'file closed okay (4)');
#?rakudo skip "prototype of sub lines(...) doesn't have limit yet"
@@ -136,26 +137,10 @@ is(+@lines8, 4, 'we got four lines from the file (lazily)');
is(@lines8[0], "Hello World", 'lines($in,3) worked in list context');
is(@lines8[1], "Foo Bar Baz", 'lines($in,3) worked in list context');
is(@lines8[2], "The End", 'lines($in,3) worked in list context');
+#?rakudo todo 'nom regression'
is(@lines8[3], "and finally... Its not over yet!", 'get($in) worked after lines($in,$n)');
}
-{
-my @lines9 = lines($filename);
-is(+@lines9, 4, 'we got four lines from the file (lines for filename)');
-is(@lines9[0], "Hello World", 'lines($filename) worked in list context');
-is(@lines9[1], "Foo Bar Baz", 'lines($filename) worked in list context');
-is(@lines9[2], "The End", 'lines($filename) worked in list context');
-is(@lines9[3], "... Its not over yet!", 'lines($filename) worked in list context');
-}
-
-{
-my @lines10 = lines($filename, 3);
-is(+@lines10, 3, 'we got two lines from the file (lines($filename,3))');
-is(@lines10[0], "Hello World", 'lines($filename,3) worked in list context');
-is(@lines10[1], "Foo Bar Baz", 'lines($filename,3) worked in list context');
-is(@lines10[2], "The End", 'lines($filename,3) worked in list context');
-}
-
#now be sure to delete the file as well
ok(unlink($filename), 'file has been removed');
@@ -216,6 +201,7 @@ ok($fh9.close, 'file closed okay (9)');
ok(unlink($filename), 'file has been removed');
nok $filename.IO ~~ :e, '... and the tempfile is gone, really';
+#?rakudo skip 'binary IO, encode, Buf'
{
my $binary_out_fh = open($filename, :w, :bin);
isa_ok($binary_out_fh, IO);
@@ -223,6 +209,7 @@ nok $filename.IO ~~ :e, '... and the tempfile is gone, really';
ok($binary_out_fh.close(), "file closed OK");
}
+#?rakudo skip 'binary IO, encode, Buf'
{
my $binary_in_fh = open($filename, :r, :bin);
isa_ok($binary_in_fh, IO);
Please sign in to comment.
Something went wrong with that request. Please try again.