Skip to content

Commit

Permalink
Item12888: Fn_LANGUAGES fails on utf8 sites
Browse files Browse the repository at this point in the history
Thanks to CDot for the solution.
  • Loading branch information
gac410 committed Apr 23, 2015
1 parent 7964c8d commit bf32616
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions UnitTestContrib/test/unit/Fn_LANGUAGES.pm
Expand Up @@ -9,6 +9,7 @@ our @ISA = qw( FoswikiFnTestCase );

use Foswiki;
use Error qw( :try );
use Encode;

my $topicObject;

Expand Down Expand Up @@ -66,6 +67,8 @@ sub test_simple {
* Italiano
LANGS
chomp $expected;
$expected = Encode::encode( $Foswiki::cfg{Site}{CharSet},
$expected, Encode::FB_CROAK );
$this->assert_str_equals( $expected, $result );
}

Expand All @@ -78,6 +81,8 @@ sub test_format {
de-Deutsch|en-English|fr-Français|it-Italiano
LANGS
chomp $expected;
$expected = Encode::encode( $Foswiki::cfg{Site}{CharSet},
$expected, Encode::FB_CROAK );
$this->assert_str_equals( $expected, $result );
}

Expand All @@ -91,6 +96,8 @@ sub test_selected {
de-Deutsch|en-English|fr-Français**|it-Italiano
LANGS
chomp $expected;
$expected = Encode::encode( $Foswiki::cfg{Site}{CharSet},
$expected, Encode::FB_CROAK );
$this->assert_str_equals( $expected, $result );
}

Expand All @@ -104,6 +111,8 @@ sub test_standard_esc {
de\$<Deutsch>,en\$<English>,fr\$<Français>&,it\$<Italiano>
LANGS
chomp $expected;
$expected = Encode::encode( $Foswiki::cfg{Site}{CharSet},
$expected, Encode::FB_CROAK );
$this->assert_str_equals( $expected, $result );
}

Expand Down

0 comments on commit bf32616

Please sign in to comment.