This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "From: Todd Rinaldo <toddr@cpanel.net>"
[perl5.git] / dist / Locale-Maketext / t / 30_local.t
CommitLineData
f666394a
RGS
1#!/usr/bin/perl -Tw
2
3use strict;
5350a4e5 4
2ccd21fc 5use Test::More tests => 4;
5350a4e5 6use Locale::Maketext;
2ccd21fc
FC
7print "# Hi there...\n";
8pass();
9
10print "# --- Making sure that Perl globals are localized ---\n";
5350a4e5
SH
11
12# declare a class...
13{
14 package Woozle;
f666394a
RGS
15 our @ISA = ('Locale::Maketext');
16 our %Lexicon = (
5350a4e5
SH
17 _AUTO => 1
18 );
19 keys %Lexicon; # dodges the 'used only once' warning
20}
21
b6703958 22my $lh = Woozle->new();
2ccd21fc 23ok(ref $lh, 'Basic sanity');
5350a4e5 24
5350a4e5 25$@ = 'foo';
2ccd21fc
FC
26is($lh->maketext('Eval error: [_1]', $@), 'Eval error: foo',
27 'Make sure $@ is localized');
28
29print "# Byebye!\n";
30pass();