This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "Add new Locale::Maketext files to MANIFEST"
[perl5.git] / dist / Locale-Maketext / t / 70_fail_auto.t
1 #!/usr/bin/perl -Tw
2
3 use strict;
4 use Test::More tests => 5;
5
6 BEGIN {
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
22 my $lh = Whunk::L10N->get_handle('en');
23 $lh->fail_with('failure_handler_auto');
24
25 is($lh->maketext('abcd'), 'abcd', "simple missing keys are handled"); 
26 is($lh->maketext('abcd'), 'abcd', "even in repeated calls"); 
27 # CPAN RT #25877 - $value Not Set After Second Call to failure_handler_auto()
28
29 is($lh->maketext('Hey, [_1]', 'you'), 'Hey, you', "keys with bracket notation ok");
30
31 is($lh->maketext('_key'), '_key', "keys which start with _ ok");
32