File: xx_tr_template.t.pl

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 (31 lines) | stat: -rw-r--r-- 772 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
use strict;
use Test::More tests => 3;  # number of tests

my $name        =   "";     # transliterations name
my $reversible  =   0;      # is the transliteration reversible?

my $input       =   "";     # short corpus...
my $output_ok   =   "";     # ...its correct transliteration

my $context     =   "";     # context-sensitive example
my $context_ok  =   "";     # ...its correct transliteration

use Lingua::Translit;

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


my $output = $tr->translit($input);

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

# 2
is($output, $output_ok, "$name: transliteration");

$output = $tr->translit($context);

# 3
is($output, $context_ok, "$name: transliteration (context-sensitive)");

# vim: sts=4 sw=4 enc=utf-8 ai et