Upgrade to Locale::Maketext 1.09
[p5sagit/p5-mst-13.2.git] / lib / Locale / Maketext / t / 90_utf8.t
CommitLineData
f600d105 1
2require 5;
3use Test;
4BEGIN { plan tests => 4; }
5use Locale::Maketext 1.01;
6print "# Hi there...\n";
7ok 1;
8
9
10print "# --- Making sure that get_handle works with utf8 ---\n";
11use utf8;
12
13# declare some classes...
14{
15 package Woozle;
16 @ISA = ('Locale::Maketext');
17 sub dubbil { return $_[1] * 2 .chr(2000)}
18 sub numerate { return $_[2] . 'en' }
19}
20{
21 package Woozle::eu_mt;
22 @ISA = ('Woozle');
23 %Lexicon = (
24 'd2' => chr(1000) . 'hum [dubbil,_1]',
25 'd3' => chr(1000) . 'hoo [quant,_1,zaz]',
26 'd4' => chr(1000) . 'hoo [*,_1,zaz]',
27 );
28 keys %Lexicon; # dodges the 'used only once' warning
29}
30
31my $lh;
32print "# Basic sanity:\n";
33ok defined( $lh = Woozle->get_handle('eu-mt') ) && ref($lh);
34ok $lh && $lh->maketext('d2', 7), chr(1000)."hum 14".chr(2000) ;
35
36
37print "# Byebye!\n";
38ok 1;
39