Sha256: 86dc9bbea93d188336552c5b58db38ce1f24153e8303d1b55542ba728c32ce33

Contents?: true

Size: 998 Bytes

Versions: 8

Compression:

Stored size: 998 Bytes

Contents

require 'gettext'
include GetText

class TestRubyParser_n
  bindtextdomain("rubyparser", :path => "locale")

  def test_1
    n_("aaa","aaa2",1)
  end

  def test_2
    n_("bbb\n", "ccc2\nccc2", 1)
  end

  def test_3_1
    n_("ddd\nddd", 
	"ddd2\nddd2", 
	1)
  end
  def test_3_2
    n_("eee\neee\n" ,
       "eee2\neee2\n" , 
       1)
  end

  def test_4
     n_("ddd
eee
", "ddd
eee2", 1)
  end

  def test_5_1
    n_("fff", "fff2", 1)
  end

  def test_5_2
    n_("fff", "fff2", 1) + "foo" + n_("ggg", "ggg2", 1)
  end

  def test_6
    n_("ggg"\
      "hhh"\
      "iii",
       "jjj"\
       "kkk"\
       "lll", 1)
  end

  def test_7
    n_('a"b"c"', 'a"b"c"2', 1)
  end

  def test_8
    n_("d\"e\"f\"", "d\"e\"f\"2", 1)
  end

  def test_9
    n_("mmm" + "mmm","mmm2" + "mmm2",1) + 
    n_("nnn" ,"nnn2" ,1)
  end

  def test_10
    _("ooo")
    n_("ooo", "ppp", 1)
  end

  def test_11
    n_("qqq", "rrr", 1) 
    n_("qqq", "sss", 1)  # This is merged to "qqq\000rrr".
  end

end
    

Version data entries

8 entries across 8 versions & 4 rubygems

Version Path
experteer-gettext-2.0.4.2 test/testlib/ngettext.rb
grosser-gettext-2.0.0 test/testlib/ngettext.rb
retoo-ruby_gettext_extractor-0.2.1 test/cases/ngettext.rb
gettext-2.0.0 test/testlib/ngettext.rb
gettext-2.0.1 test/testlib/ngettext.rb
gettext-2.0.2 test/testlib/ngettext.rb
gettext-2.0.3 test/testlib/ngettext.rb
gettext-2.0.4 test/testlib/ngettext.rb