Skip to content

Commit

Permalink
Unfudges after JVM wordcase fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jul 17, 2013
1 parent 8e666ec commit fe3dafd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
10 changes: 2 additions & 8 deletions S32-str/capitalize.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,31 @@ plan 17;

# L<S32::Str/Str/wordcase>

#?rakudo skip 'related to RT #117889'
#?rakudo.parrot skip 'related to RT #117889'
is wordcase(""), "", "wordcase('') works";
#?rakudo.jvm 4 todo "nigh"
is wordcase("puGS Is cOOl!"), "Pugs Is Cool!", "wordcase('...') works";
is "puGS Is cOOl!".wordcase, "Pugs Is Cool!", "'...'.wordcase works";
#?niecza 2 todo "wordcase somewhat stupid right now"
is "don't sit under the apple tree".wordcase, "Don't Sit Under The Apple Tree", "wordcase works properly with apostrophes";
is "tir-na nog'th".wordcase, "Tir-na Nog'th", "wordcase works properly with apostrophes and dashes";

my $a = "";
#?rakudo skip 'related to RT #117889'
#?rakudo.parrot skip 'related to RT #117889'
is wordcase($a), "", "wordcase empty string";
$a = "puGS Is cOOl!";
#?rakudo.jvm todo "nigh"
is wordcase($a), "Pugs Is Cool!", "wordcase string works";
is $a, "puGS Is cOOl!", "original string not touched";
#?rakudo.jvm todo "nigh"
is $a.wordcase, "Pugs Is Cool!", "wordcase string works";
is $a, "puGS Is cOOl!", "original string not touched";
#?rakudo.jvm todo "nigh"
is "ab cD Ef".wordcase, "Ab Cd Ef", "works on ordinary string";


#?rakudo.jvm todo "nigh"
{
$_ = "puGS Is cOOl!";
is .wordcase, "Pugs Is Cool!", 'wordcase() uses \$_ as default';
}

# Non-ASCII chars:
#?rakudo.jvm todo "nigh"
is wordcase("äöü abcä"), "Äöü Abcä", "wordcase() works on non-ASCII chars";#

#?rakudo 2 todo 'graphemes results wrong'
Expand Down
3 changes: 0 additions & 3 deletions S32-str/substr.t
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ 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");
#?rakudo.jvm todo "nigh"
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 @@ -120,7 +119,6 @@ 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)).");
#?rakudo.jvm todo "nigh"
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 @@ -241,7 +239,6 @@ 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)).");
#?rakudo.jvm todo "nigh"
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 fe3dafd

Please sign in to comment.