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 use vars qw(@ISA); 13 @ISA = 'Locale::Maketext'; 14} 15 16{ 17 package Whunk::L10N::en; 18 use vars qw(@ISA); 19 @ISA = 'Whunk::L10N'; 20} 21 22my $lh = Whunk::L10N->get_handle('en'); 23$lh->fail_with('failure_handler_auto'); 24 25is($lh->maketext('abcd'), 'abcd', "simple missing keys are handled"); 26is($lh->maketext('abcd'), 'abcd', "even in repeated calls"); 27# CPAN RT #25877 - $value Not Set After Second Call to failure_handler_auto() 28 29is($lh->maketext('Hey, [_1]', 'you'), 'Hey, you', "keys with bracket notation ok"); 30 31is($lh->maketext('_key'), '_key', "keys which start with _ ok"); 32 33