Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Minimal test changes for rindex(--> Index)
  • Loading branch information
lizmat committed Jul 29, 2015
1 parent ea00fa0 commit d2e3055
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions S32-str/rindex.t
Expand Up @@ -3,7 +3,11 @@ use Test;

# L<S32::Str/Str/"=item rindex">

plan 33;
plan 35;

# Type of return value
isa-ok('abc'.rindex('b'), Index);
isa-ok('abc'.rindex('d'), Nil);

# Simple - with just a single char

Expand Down Expand Up @@ -44,7 +48,7 @@ is(rindex("what are these « » unicode characters for ?", "uni"), 19, "over uni

# .rindex use
is("Hello World".rindex("l"), 9, ".rindex on string");
is("Hello World".rindex(''), 11, ".rindex('') on string gives string length in bytes");
is("Hello World".rindex(''), 11, ".rindex('') on string gives string length graphemes");

# on scalar variable
my $s = "Hello World";
Expand Down

0 comments on commit d2e3055

Please sign in to comment.