test/tools/test_msgmerge.rb in gettext-3.0.3 vs test/tools/test_msgmerge.rb in gettext-3.0.4

- old
+ new

@@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- # -# Copyright (C) 2012-2013 Kouhei Sutou <kou@clear-code.com> +# Copyright (C) 2012-2014 Kouhei Sutou <kou@clear-code.com> # Copyright (C) 2010 Eddie Lau <tatonlto@gmail.com> # # License: Ruby's or LGPL # # This library is free software: you can redistribute it and/or modify @@ -469,22 +469,42 @@ #{po_header(@pot_formatted_time, @po_formatted_time)} #: hello.rb:1 msgid "Hello" msgstr "" +#: hello.rb:3 +msgid "Hello World" +msgstr "" + #: hello.rb:2 msgid "World" msgstr "Translated World" + PO + end + def test_sort_by_file + @msgmerge.run("--update", + "--sort-by-file", + @po_file_path, @pot_file_path) + assert_equal(<<-PO, File.read(@po_file_path)) +#{po_header(@pot_formatted_time, @po_formatted_time)} +#: hello.rb:1 +msgid "Hello" +msgstr "" + +#: hello.rb:2 +msgid "World" +msgstr "Translated World" + #: hello.rb:3 msgid "Hello World" msgstr "" PO end - def test_sort_by_file + def test_sort_by_location @msgmerge.run("--update", - "--sort-by-file", + "--sort-by-location", @po_file_path, @pot_file_path) assert_equal(<<-PO, File.read(@po_file_path)) #{po_header(@pot_formatted_time, @po_formatted_time)} #: hello.rb:1 msgid "Hello"