Skip to content

Commit 5538cbe

Browse files
committed
Test nqp::tc and nqp::tclc a bit.
1 parent 9abf968 commit 5538cbe

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

t/nqp/059-nqpop.t

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Test nqp::op pseudo-functions.
44

5-
plan(286);
5+
plan(298);
66

77
ok( nqp::add_i(5,2) == 7, 'nqp::add_i');
88
ok( nqp::sub_i(5,2) == 3, 'nqp::sub_i');
@@ -472,3 +472,17 @@ if nqp::getcomp('nqp').backend.name eq 'jvm' {
472472
is(nqp::without(Defined.new, "good", "bad"), "bad");
473473
is(nqp::without(NotDefined.new, "good", "bad"), "good");
474474
}
475+
476+
is(nqp::tclc('aBcD'), 'Abcd', 'tclc sub form on mixed-case latin string');
477+
is(nqp::tclc('ßß'), 'Ssß', 'tclc and German sharp s');
478+
is(nqp::tclc('ljenčariti'), 'Ljenčariti', 'lj => Lj (in one character)');
479+
is(nqp::tclc('Ångstrom'), 'Ångstrom', 'Å remains Å');
480+
is(nqp::tclc("\x1044E TEST"), "\x10426 test", 'tclc works on codepoints greater than 0xffff');
481+
482+
is(nqp::tc("hello world"), "HELLO WORLD", "simple");
483+
is(nqp::tc(""), "", "empty string");
484+
is(nqp::tc("ü"), "Ü", "umlaut");
485+
is(nqp::tc("ó"), "Ó", "accented chars");
486+
is(nqp::tc('ß'), 'Ss', 'sharp s => Ss');
487+
is(nqp::tc('$'), '$', "character that don't have title case remain unchanged");
488+
is(nqp::tc("\x1044E"), "\x10426", 'tc works on codepoints greater than 0xffff');

0 commit comments

Comments
 (0)