Skip to content

Commit

Permalink
Change a few straggling capitalize calls to word.case.
Browse files Browse the repository at this point in the history
  • Loading branch information
colomon committed May 6, 2013
1 parent 7c4e0b5 commit 8861b64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion S05-modifier/ii.t
Expand Up @@ -40,7 +40,7 @@ my @smart_tests = (
['He lo', 'FOOO', 'Fooo', 'ucfrst(lc())'],
['hE LO', 'fooo', 'fOOO', 'lcfrst(uc())'],
['hE LO', 'foobar', 'fOOBAR', 'lcfrst(uc())'],
['Ab Cd E', 'abc de gh i', 'Abc De Gh I', 'capitalize()'],
['Ab Cd E', 'abc de gh i', 'Abc De Gh I', 'wordcase()'],
);

for @smart_tests -> $t {
Expand Down
6 changes: 3 additions & 3 deletions S32-str/substr.t
Expand Up @@ -59,7 +59,7 @@ plan 92;
is(substr("hello foo bar", 6, 3), "foo", "substr on literal string");
is("hello foo bar".substr(6, 3), "foo", ".substr on literal string");
is("hello foo bar".substr(6, 3).uc, "FOO", ".substr.uc on literal string");
is("hello foo bar and baz".substr(6, 10).capitalize, "Foo Bar An", ".substr.capitalize on literal string");
is("hello foo bar and baz".substr(6, 10).wordcase, "Foo Bar An", ".substr.wordcase on literal string");
is("hello »« foo".substr(6, 2), "»«", ".substr on unicode string");
is("שיעבוד כבר".substr(4, 4), "וד כ", ".substr on Hebrew text");
}
Expand Down Expand Up @@ -119,7 +119,7 @@ sub l (Int $a) { my $l = $a; return $l }
is(substr("hello foo bar", 6, l(3)), "foo", "substr on literal string (substr(Int, StrLen)).");
is("hello foo bar".substr(6, l(3)), "foo", ".substr on literal string (substr(Int, StrLen)).");
is("hello foo bar".substr(6, l(3)).uc, "FOO", ".substr.uc on literal string (substr(Int, StrLen)).");
is("hello foo bar and baz".substr(6, l(10)).capitalize, "Foo Bar An", ".substr.capitalize on literal string (substr(Int, StrLen)).");
is("hello foo bar and baz".substr(6, l(10)).wordcase, "Foo Bar An", ".substr.wordcase on literal string (substr(Int, StrLen)).");
is("hello »« foo".substr(6, l(2)), "»«", ".substr on unicode string (substr(Int, StrLen)).");
is("שיעבוד כבר".substr(4, l(4)), "וד כ", ".substr on Hebrew text (substr(Int, StrLen)).");
}
Expand Down Expand Up @@ -239,7 +239,7 @@ sub p (Int $a) { my $p = $a; return $p }
is(substr("hello foo bar", 6, p(3)), "foo", "substr on literal string (substr(Int, StrPos)).");
is("hello foo bar".substr(6, p(3)), "foo", ".substr on literal string (substr(Int, StrPos)).");
is("hello foo bar".substr(6, p(3)).uc, "FOO", ".substr.uc on literal string (substr(Int, StrPos)).");
is("hello foo bar and baz".substr(6, p(10)).capitalize, "Foo Bar An", ".substr.capitalize on literal string (substr(Int, StrPos)).");
is("hello foo bar and baz".substr(6, p(10)).wordcase, "Foo Bar An", ".substr.wordcase on literal string (substr(Int, StrPos)).");
is("hello »« foo".substr(6, p(2)), "»«", ".substr on unicode string (substr(Int, StrPos)).");
is("שיעבוד כבר".substr(4, p(4)), "וד כ", ".substr on Hebrew text (substr(Int, StrPos)).");
}
Expand Down

0 comments on commit 8861b64

Please sign in to comment.