first pass RT4 merge, RT#13852
[freeside.git] / rt / t / api / i18n.t
1
2 use strict;
3 use warnings;
4 use RT;
5 use RT::Test nodb => 1, tests => 9;
6
7
8 {
9
10 use_ok ('RT::I18N');
11 ok(RT::I18N->Init);
12
13
14 }
15
16 {
17
18 ok(my $chinese = RT::I18N->get_handle('zh_tw'));
19 ok(UNIVERSAL::can($chinese, 'maketext'));
20 like($chinese->maketext('__Content-Type') , qr/utf-8/i, "Found the utf-8 charset for traditional chinese in the string ".$chinese->maketext('__Content-Type'));
21 is($chinese->encoding , 'utf-8', "The encoding is 'utf-8' -".$chinese->encoding);
22
23 ok(my $en = RT::I18N->get_handle('en'));
24 ok(UNIVERSAL::can($en, 'maketext'));
25 is($en->encoding , 'utf-8', "The encoding ".$en->encoding." is 'utf-8'");
26
27
28 }
29