Sha256: 27f726e8c754ea8be143bf0c5988e674b2eabb085ad7bbcf444c49ab50152a18

Contents?: true

Size: 731 Bytes

Versions: 9

Compression:

Stored size: 731 Bytes

Contents

require 'testlib/helper.rb'
require 'gettext'
require 'gettext/tools/rgettext.rb'
require 'stringio'

class TestPoGeneration < Test::Unit::TestCase
  def test_extracted_comments
    GetText::RGetText.run(
      File.join(File.dirname(__FILE__), 'testlib/gettext.rb'), 
      out = StringIO.new)
    res = out.string

    # Use following to debug the content of the
    # created file: File.open('/tmp/test.po', 'w').write(res)

    assert_match '#. "Fran\u00e7ois" or (with HTML entities) "Fran&ccedil;ois".', res
    assert_no_match /Ignored/, res, 'Only comments starting with TRANSLATORS should be extracted'
    assert_no_match /TRANSLATORS: This is a proper name/, res, 'The prefix "TRANSLATORS:" should be skipped'
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
experteer-gettext-2.0.4.1 test/test_po_generation.rb
experteer-gettext-2.0.4 test/test_po_generation.rb
fair-gettext-2.0.7 test/test_po_generation.rb
fair-gettext-2.0.6 test/test_po_generation.rb
fair-gettext-2.0.5 test/test_po_generation.rb
fair-gettext-2.0.4 test/test_po_generation.rb
fair-gettext-2.0.3 test/test_po_generation.rb
fair-gettext-2.0.2 test/test_po_generation.rb
gettext-2.1.0 test/test_po_generation.rb