summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/lib/Locale/Maketext/t/60_super.t
blob: 922275d179d60b9e1610545d4b513cd558a99689 (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

require 5;
use strict;
use Test;

# use a BEGIN block so we print our plan before MyModule is loaded
BEGIN { plan tests => 3 }

ok 1;
print "# Locale::Maketext version $Locale::Maketext::VERSION\n";

#sub Locale::Maketext::DEBUG () {10};
use Locale::Maketext ();
{ package  Whunk::L10N;  use vars qw(@ISA %Lexicon);  @ISA =  'Locale::Maketext';
  %Lexicon = ("hello" => "SROBLR!");
}
{ package  Whunk::L10N::en;      use vars qw(@ISA %Lexicon);  @ISA =  'Whunk::L10N';
  %Lexicon = ("hello" => "HI AND STUFF!");
}
{  package  Whunk::L10N::zh_tw;  use vars qw(@ISA %Lexicon);  @ISA =  'Whunk::L10N';
  %Lexicon = ("hello" => "NIHAU JOE!");
}

$ENV{'REQUEST_METHOD'} = 'GET';
$ENV{'HTTP_ACCEPT_LANGUAGE'} = 'en-US, zh-TW';

my $x = Whunk::L10N->get_handle;
print "# LH object: $x\n";
ok $x->maketext('hello'), "HI AND STUFF!";
print "# OK bye\n";
ok 1;