Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Tests for RT #124144 (uniname out of bounds).
  • Loading branch information
jnthn committed Apr 24, 2015
1 parent 46452a1 commit 35b2288
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion S15-unicode-information/uniname.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 27;
plan 31;

# Unicode version pragma not needed here, as names cannot change.

Expand Down Expand Up @@ -48,5 +48,11 @@ is uniname("¶", :either :one), "PARAGRAPH SIGN", "uniname(:eithe
is uniname("\x[2028]", :either :one), "LINE SEPARATOR", "uniname(:either :one) returns current Unicode name for formatting character.";
is uniname("\x[80]", :either :one), "<control-0080>", "uniname(:either :one) returns codepoint label for control character without any name.";

# RT #124144
is uniname(-1), '<illegal>', "uniname with negative returns <illegal> (1)";
is uniname(-5), '<illegal>', "uniname with negative returns <illegal> (2)";
is uniname(0x110000), '<unassigned>', "uniname too high returns <unassigned> (1)";
is uniname(0x210000), '<unassigned>', "uniname too high returns <unassigned> (2)";

is uninames("AB"), ("LATIN CAPITAL LETTER A", "LATIN CAPITAL LETTER B"), "uninames correctly works on every character";
is "AB".uninames, ("LATIN CAPITAL LETTER A", "LATIN CAPITAL LETTER B"), "uninames correctly works on every character";

0 comments on commit 35b2288

Please sign in to comment.