Convert File/CheckTree.t from Test to Test::More.
[p5sagit/p5-mst-13.2.git] / dist / Locale-Maketext / t / 30_local.t
CommitLineData
f666394a 1#!/usr/bin/perl -Tw
2
3use strict;
5350a4e5 4
5350a4e5 5use Test;
6BEGIN { plan tests => 4; }
7use Locale::Maketext;
8print "# Hi there...\n";
9ok 1;
10
11print "# --- Making sure that Perl globals are localized ---\n";
12
13# declare a class...
14{
15 package Woozle;
f666394a 16 our @ISA = ('Locale::Maketext');
17 our %Lexicon = (
5350a4e5 18 _AUTO => 1
19 );
20 keys %Lexicon; # dodges the 'used only once' warning
21}
22
23my $lh;
24print "# Basic sanity:\n";
25ok defined( $lh = Woozle->new() ) && ref($lh);
26
27print "# Make sure \$@ is localized...\n";
28$@ = 'foo';
f666394a 29ok $lh && $lh->maketext('Eval error: [_1]', $@), 'Eval error: foo';
5350a4e5 30
31print "# Byebye!\n";
32ok 1;