blob: 8b89777e20f1dedb8587c6e344eac596f9762508 (
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
|
#!/usr/bin/perl -Tw
use strict;
use Test::More tests => 4;
use Locale::Maketext;
print "# Hi there...\n";
pass();
print "# --- Making sure that Perl globals are localized ---\n";
# declare a class...
{
package Woozle;
our @ISA = ('Locale::Maketext');
our %Lexicon = (
_AUTO => 1
);
keys %Lexicon; # dodges the 'used only once' warning
}
my $lh = Woozle->new();
ok(ref $lh, 'Basic sanity');
$@ = 'foo';
is($lh->maketext('Eval error: [_1]', $@), 'Eval error: foo',
'Make sure $@ is localized');
print "# Byebye!\n";
pass();
|