1#!/usr/bin/perl -Tw
2
3use strict;
4use Test::More tests => 5;
5
6BEGIN {
7    use_ok( 'Locale::Maketext' );
8}
9
10{
11    package Whunk::L10N;
12    our @ISA =  'Locale::Maketext';
13}
14
15{
16    package Whunk::L10N::en;
17    our @ISA = 'Whunk::L10N';
18}
19
20my $lh = Whunk::L10N->get_handle('en');
21$lh->fail_with('failure_handler_auto');
22
23is($lh->maketext('abcd'), 'abcd', "simple missing keys are handled");
24is($lh->maketext('abcd'), 'abcd', "even in repeated calls");
25# CPAN RT #25877 - $value Not Set After Second Call to failure_handler_auto()
26
27is($lh->maketext('Hey, [_1]', 'you'), 'Hey, you', "keys with bracket notation ok");
28
29is($lh->maketext('_key'), '_key', "keys which start with _ ok");
30
31