blob: 743d8eecbd605c78ab23110c1233a5b9cca5fb56 (
plain)
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
|
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
}
BEGIN { $| = 1; print "1..3\n"; }
END {print "not ok 1\n" unless $loaded;}
use Locale::Maketext 1.01;
print "# Perl v$], Locale::Maketext v$Locale::Maketext::VERSION\n";
$loaded = 1;
print "ok 1\n";
{
package Woozle;
@ISA = ('Locale::Maketext');
sub dubbil { return $_[1] * 2 }
}
{
package Woozle::elx;
@ISA = ('Woozle');
%Lexicon = (
'd2' => 'hum [dubbil,_1]',
);
}
$lh = Woozle->get_handle('elx');
if($lh) {
print "ok 2\n";
my $x = $lh->maketext('d2', 7);
if($x eq "hum 14") {
print "ok 3\n";
} else {
print "not ok 3\n (got \"$x\")\n";
}
} else {
print "not ok 2\n";
}
#Shazam!
|