Skip to content

Commit

Permalink
tests: add test for wrapping differences compared to gettext
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed May 20, 2024
1 parent 74867df commit 29c50fb
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tests/translate/storage/test_po.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,42 @@ def test_wrapping_cjk(self):
msgstr ""
"効率的なバグの報告はPostGISの開発を助ける本質的な方法です。最も効率的なバグ報"
"告は、PostGIS開発者がそれを再現できるようにすることで、それの引き金となったス"
"""
assert self.poreflow(posource) == posource

@mark.xfail(reason="Incompatible wrapping with gettext, see #5251")
def test_wrap_emoji(self):
posource = r"""msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgid "test"
msgstr ""
"print(ts.string_get_word_breaks(\"Test ❤️‍🔥 Test\")) # Prints [1, 2, 3, 4, 5, "
"""
assert self.poreflow(posource) == posource

@mark.xfail(reason="Incompatible wrapping with gettext, see #5251")
def test_wrap_parenthesis(self):
posource = r"""msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgid "test"
msgstr ""
"Konvertiert [param what] in [param type] auf die bestmögliche Weise. Der "
"[param type] verwendet die [enum Variant.Type]-Werte.\n"
msgid "test2"
msgstr ""
"- Eine von [Object] abgeleitete Klasse, die in [ClassDB] existiert, z. B. "
"[Node].\n"
msgid "test3"
msgstr ""
"Must be required by a NotificationListenerService, to ensure that only the "
"system can bind to it. See [url=https://developer.android.com/reference/"
"android/Manifest."
"permission#BIND_NOTIFICATION_LISTENER_SERVICE]BIND_NOTIFICATION_LISTENER_SERVICE[/"
"url]."
"""
assert self.poreflow(posource) == posource

Expand Down

0 comments on commit 29c50fb

Please sign in to comment.