Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

41 lines (30 sloc) 1.19 KB
use v6;
use Test;
plan 13;
# L<S32::Str/Str/lc>
is(lc("hello world"), "hello world", "lowercasing string which is already lowercase");
is(lc("Hello World"), "hello world", "simple lc test");
is(lc(""), "", "empty string");
is(lc("ÅÄÖ"), "åäö", "some finnish non-ascii chars");
is(lc("ÄÖÜ"), "äöü", "lc of German Umlauts");
is(lc("ÓÒÚÙ"), "óòúù", "accented chars");
is(lc('A'..'C'), "a b c", "lowercasing char-range");
$_ = "Hello World";
my $x = .lc;
is($x, "hello world", 'lc uses $_ as default');
{ # test invocant syntax for lc
my $x = "Hello World";
is($, "hello world", '$ works');
is($x, 'Hello World', 'Invocant unchanged');
is("Hello World".lc, "hello world", '"Hello World".lc works');
is("ÁÉÍÖÜÓŰŐÚ".lc, "áéíöüóűőú", ".lc on Hungarian vowels");
# "The Greek letter Σ has two different lowercase forms: "ς" in word-final
# position and "σ" elsewhere."
#?niecza todo 'advanced Unicode wizardry'
#?rakudo.moar todo 'case folding, MoarVM #87 RT #124689'
is 'ΣΣΣ'.lc, 'σσς', 'lower-casing of greek Sigma respects word-final special case';
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.