Sha256: 7a2c279b5a3cdb1ac90ed91643a12077e4272c78ffbd277b43c3f95703d622be
Contents?: true
Size: 504 Bytes
Versions: 1
Compression:
Stored size: 504 Bytes
Contents
# encoding: utf-8 require 'gettext/runtime/mofile' class TestMoFile < Test::Unit::TestCase def test_non_ascii mo = load_mo("non_ascii.mo") assert_equal("Hello in Japanese", mo["こんにちは"]) end def test_backslash mo = load_mo("backslash.mo") assert_equal("'\\'は'\\\\'とエスケープするべきです。", mo["You should escape '\\' as '\\\\'."]) end def load_mo(file) GetText::MoFile.open("locale/ja/LC_MESSAGES/#{file}", "UTF-8") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gettext-2.3.0 | test/test_mofile.rb |