Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fudge jvm for RT #126495
  • Loading branch information
coke committed Oct 30, 2015
1 parent 9c86762 commit f55436c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion S32-io/spurt.t
Expand Up @@ -13,13 +13,13 @@ all-basic({ $path });
# filename as IO tests
all-basic({ $path.IO });


sub all-basic(Callable $handle) {
my Blob $buf = "hello world".encode("utf-8");
my $txt = "42";

#?niecza 2 skip ":bin option for slurp fails"
spurt $handle(), $buf;
#?rakudo.jvm 11 skip 'RT #126495 - This type does not support positional operations'
is slurp($path, :bin), $buf, "spurting Buf ok";

spurt $handle(), $txt;
Expand Down Expand Up @@ -60,12 +60,14 @@ sub all-basic(Callable $handle) {
#?niecza skip "Unable to resolve method open in type IO"
{
# Spurt on open file
#?rakudo.jvm skip 'RT #126495 - This type does not support positional operations'
{
spurt $path, "42";
is slurp($path), "42", 'can spurt into an open file';
}

# Buf into an open non binary file
#?rakudo.jvm skip 'RT #126495 - This type does not support positional operations'
{
my Buf $buf = Buf.new(0xC0, 0x01, 0xF0, 0x0D);
spurt $path, $buf;
Expand Down Expand Up @@ -99,6 +101,7 @@ sub all-basic(Callable $handle) {
my Blob $buf = "meow".encode("ASCII");
$path.IO.spurt($buf);
#?niecza skip "Excess arguments to slurp, unused named bin"
#?rakudo.jvm skip 'RT #126495 - This type does not support positional operations'
is slurp($path, :bin), $buf, "IO::Handle binary slurp";

dies-ok { $path.IO.spurt("nope", :createonly) }, "IO::Handle :createonly dies";
Expand Down

0 comments on commit f55436c

Please sign in to comment.