Sha256: 8b9ecbd22a0f06aedffbfcdc7b37ed728da325461661a3c6b3e3ab9a43f3e3df
Contents?: true
Size: 532 Bytes
Versions: 1
Compression:
Stored size: 532 Bytes
Contents
# encoding: utf-8 require 'testlib/helper.rb' 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.2.1 | test/test_mofile.rb |