File: 31_prohibited_characters_extra.t

package info (click to toggle)
libunicode-stringprep-perl 1.104%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 284 kB
  • sloc: perl: 3,558; sh: 48; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 435 bytes parent folder | download | duplicates (4)
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
use strict;
use utf8;

no warnings 'utf8';

use Test::More;
use Test::NoWarnings;

use Unicode::Stringprep;

our @map_data = (
    0xE0001, 0xE0001,
    0xE0020, 0xE007F,
    0xEFFFE, 0x10FFFF,
);

our @data = (
    0xE0002,
);

plan tests => ($#data+1) + 1;

my $prep = Unicode::Stringprep->new( 3.2, [ ], '', [ @map_data ], 0 );

foreach(@data) 
{
  my $in = $_;
  is( eval { $prep->(chr($in)) }, chr($in), sprintf 'U+%04X', $in);
}