Skip to content

Commit b3fdc3f

Browse files
committed
Test nqp::getstrfromname and nqp::codepointfromname with NULL
1 parent d9b5bc3 commit b3fdc3f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

t/nqp/106-unicodenames.t

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
plan(29);
1+
plan(31);
22
is(nqp::getstrfromname('FULL STOP'), '.', 'getstrfromname works');
33
is(nqp::codepointfromname('FULL STOP'), nqp::ord('.'), 'codepointfromname works');
44
is(nqp::getstrfromname('super fake not real name'), '', 'getstrfromname returns empty string for nonexistant codepoint names');
@@ -35,6 +35,9 @@ else {
3535

3636
}
3737

38+
is(nqp::codepointfromname('NULL'), 0, 'nqp::codepointfromname with NULL');
39+
is(nqp::getstrfromname('NULL'), "\0", 'nqp::getstrfromname with NULL');
40+
3841
is(nqp::codepointfromname('LATIN CAPITAL LETTER A'), 65, 'nqp::codepointfromname');
3942

4043
is(nqp::codepointfromname('NO SUCH NAME IN UNICODE WHATSOEVER'), -1, 'nqp::codepointfromname with missing unicode character name');

0 commit comments

Comments
 (0)