Sha256: b23fa34977906dcab9c6f3962b43e5a5d0556e862576589f118945dfd943063e

Contents?: true

Size: 1.62 KB

Versions: 7

Compression:

Stored size: 1.62 KB

Contents

# Copyright (C) 2020  Sutou Kouhei <kou@clear-code.com>
#
# License: Ruby's or LGPL
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

require "gettext/tools/parser/gtk_builder_ui_definitions"

class TestGtkBuilderUIDefinitionsParser < Test::Unit::TestCase
  include Helper::Parser

  def parse(file)
    GetText::GtkBuilderUIDefinitionsParser.parse(fixture_path(file))
  end

  def test_all
    assert_parse([
                   {
                     :msgid => "label with context",
                     :msgctxt => "context",
                     :references => ["gtk_builder_ui_definitions.ui:19"],
                   },
                   {
                     :msgid => "label simple",
                     :references => ["gtk_builder_ui_definitions.ui:31"],
                   },
                   {
                     :msgid => "multiple\n" + "lines\n" + "label",
                     :references => ["gtk_builder_ui_definitions.ui:55"],
                   },
                 ],
                 "gtk_builder_ui_definitions.ui")
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gettext-3.3.7 test/tools/parser/test_gtk_builder_ui_definitions.rb
gettext-3.3.6 test/tools/parser/test_gtk_builder_ui_definitions.rb
gettext-3.3.5 test/tools/parser/test_gtk_builder_ui_definitions.rb
gettext-3.3.4 test/tools/parser/test_gtk_builder_ui_definitions.rb
gettext-3.3.3 test/tools/parser/test_gtk_builder_ui_definitions.rb
gettext-3.3.2 test/tools/parser/test_gtk_builder_ui_definitions.rb
gettext-3.3.1 test/tools/parser/test_gtk_builder_ui_definitions.rb