Commit | Line | Data |
c9d0c046 |
1 | use strict; |
2 | use Test; |
3 | |
4 | BEGIN { |
5 | plan tests => 9; |
6 | $INC{'Locale/Maketext/Lexicon.pm'} = __FILE__; |
7 | $Locale::Maketext::Lexicon::VERSION = 0; |
8 | } |
9 | |
10 | use Locale::Maketext::Simple; |
11 | ok(Locale::Maketext::Simple->VERSION); |
12 | ok(loc("Just [_1] Perl [_2]", qw(another hacker)), "Just another Perl hacker"); |
13 | |
14 | { |
15 | local $^W; # shuts up 'redefined' warnings |
16 | Locale::Maketext::Simple->reload_loc; |
17 | Locale::Maketext::Simple->import(Style => 'gettext'); |
18 | } |
19 | |
20 | ok(loc("Just %1 Perl %2", qw(another hacker)), "Just another Perl hacker"); |
21 | ok(loc_lang('fr')); |
22 | ok(loc("Just %quant(%1,Perl hacker)", 1), "Just 1 Perl hacker"); |
23 | ok(loc("Just %quant(%1,Perl hacker)", 2), "Just 2 Perl hackers"); |
24 | ok(loc("Just %quant(%1,Mad skill,Mad skillz)", 3), "Just 3 Mad skillz"); |
25 | ok(loc("Error %tense(%1,present)", 'uninstall'), "Error uninstalling"); |
26 | ok(loc("Error %tense(uninstall,present)"), "Error uninstalling"); |