class MockGetText

Public Instance Methods

test_all(t) click to toggle source
# File vendor/qwik/lib/qwik/gettext.rb, line 32
def test_all(t)
  # $KCODE = 's'

  # test_gettext
  t.assert_equal 'hello', gettext('hello')

  # test_set_catalog
  cf = Qwik::CatalogFactory.new
  cf.load_all_here('catalog-??.rb')
  catalog_ja = cf.get_catalog('ja')
  set_catalog(catalog_ja)

  # test_gettext_ja
  t.assert_equal 'こんにちは', gettext('hello')
  t.assert_equal 'こんにちは', _('hello')
end