Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
substr fossil, this is done via substr-rw now
  • Loading branch information
coke committed Aug 4, 2014
1 parent dd70cbe commit 516a6dc
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions S32-str/substr.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 92;
plan 88;

# L<S32::Str/Str/=item substr>

Expand All @@ -28,23 +28,6 @@ plan 92;
is($str, "foobar", "original string still not changed");
};

#?rakudo skip 'too many args'
{ # replacement
my $str = "foobar";

substr($str, 2, 1, "i");
is($str, "foibar", "fourth arg to substr replaced part");

substr($str, *-1, 1, "blah");
is($str, "foibablah", "longer replacement expands string");

substr($str, 1, 3, "");
is($str, "fablah", "shorter replacement shrunk it");

substr($str, 1, *-1, "aye");
is($str, "fayeh", "replacement with negative length");
};

{ # misc
my $str = "hello foo and bar";
is(substr($str, 6, 3), "foo", "substr");
Expand Down

0 comments on commit 516a6dc

Please sign in to comment.