File: unistr.t

package info (click to toggle)
libunicode-map8-perl 0.13%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 996 kB
  • sloc: perl: 495; ansic: 439; sh: 6; makefile: 2
file content (33 lines) | stat: -rw-r--r-- 645 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
30
31
32
33

use Unicode::Map8;
$greek = Unicode::Map8->new("WinGreek") || die;

# This might fail if if the Unicode::String module is not installed
eval {
   $u = $greek->tou("");
};
if ($@) {
    if ($@ =~ /^Can't locate Unicode\/String/) {
        print "1..0\n";
    }
    print $@;
    exit;
}

Unicode::String->stringify_as("hex");

# here we go
print "1..2\n";

print "not " unless UNIVERSAL::isa($u, "Unicode::String");
print "ok 1\n";

print $u, "\n";

$names = join(" ", map "<$_>", $u->name);

print "$names\n";
print "not " unless $names eq "<GREEK SMALL LETTER ZETA> <GREEK SMALL LETTER PSI> <GREEK SMALL LETTER EPSILON>";
print "ok 2\n";