File: 28_tr_ALA-LC_RUS.t

package info (click to toggle)
liblingua-translit-perl 0.29-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 824 kB
  • sloc: xml: 7,707; perl: 416; makefile: 37
file content (39 lines) | stat: -rw-r--r-- 966 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
34
35
36
37
38
39
use strict;
use Test::More tests => 4;

my $name        =   "ALA-LC RUS";
my $reversible  =   0;

my $upper       =   "AБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ";
my $upper_ok    =   "ABVGDEËZhZIĬKLMNOPRSTUFKhTSChShShch″Y′ĖIUIA";

my $lower       =   "aбвгдеёжзийклмнопрстуфхцчшщъыьэюя";
my $lower_ok    =   "abvgdeëzhziĭklmnoprstufkhtschshshch″y′ėiuia";

my $context     =   "труъ ТРУЪ";
my $context_ok  =   "tru TRU";


use Lingua::Translit;

my $tr = new Lingua::Translit($name);

my $output;


# 1
is($tr->can_reverse(), $reversible, "$name: reversibility");

# 2
$output = $tr->translit($upper);
is($output, $upper_ok, "$name: upper transliteration");

# 3
$output = $tr->translit($lower);
is($output, $lower_ok, "$name: lower transliteration");

# 4
$output = $tr->translit($context);
is($output, $context_ok, "$name: transliteration (context-sensitive)");

# vim: sts=4 sw=4 ai et