-
Notifications
You must be signed in to change notification settings - Fork 135
/
lc.t
33 lines (26 loc) · 916 Bytes
/
lc.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use v6;
use Test;
plan 12;
# L<S29/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");
#?rakudo 3 skip 'unicode'
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");
#?rakudo skip "can't parse"
{
$_ = "Hello World";
my $x = .lc;
is($x, "hello world", 'lc uses $_ as default');
}
{ # test invocant syntax for lc
my $x = "Hello World";
is($x.lc, "hello world", '$x.lc works');
is($x, 'Hello World', 'Invocant unchanged');
is("Hello World".lc, "hello world", '"Hello World".lc works');
}
#?rakudo skip 'unicode'
is("ÁÉÍÖÜÓŰŐÚ".lc, "áéíöüóűőú", ".lc on Hungarian vowels");