Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
PO parser now expects a blank line before any entries can be found
  • Loading branch information
Blake-Madden committed Sep 20, 2024
1 parent 352ffd2 commit ebd452b
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions tests/potests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ msgstr "Сервер не поддерживает команду PORT."")";
{
po_file_review po;
const wchar_t* code = LR"(
#: ../src/common/decod.cpp:826
#, c-format
msgid "Incorrect frame size (%u, %s) for the frame #%u"
Expand All @@ -64,6 +65,7 @@ msgstr "Неправильный размер кадра (%d, %s) для frame #
{
po_file_review po;
const wchar_t* code = LR"(
#: ../src/common/decod.cpp:826
#, c-format
msgid "Incorrect frame size (%u, %s) for the frame #%u"
Expand All @@ -82,6 +84,7 @@ TEST_CASE("Printf fuzzy", "[po][l10n]")
{
po_file_review po;
const wchar_t* code = LR"(
#: ../src/common/decod.cpp:826
#, c-format, fuzzy
msgid "Incorrect frame size (%u, %s) for the frame #%u"
Expand All @@ -105,6 +108,7 @@ TEST_CASE("Printf fuzzy allow", "[po][l10n]")
po_file_review po;
po.review_fuzzy_translations(true);
const wchar_t* code = LR"(
#: ../src/common/decod.cpp:826
#, c-format, fuzzy
msgid "Incorrect frame size (%u, %s) for the frame #%u"
Expand All @@ -127,6 +131,7 @@ TEST_CASE("Printf no format", "[po][l10n]")
{
po_file_review po;
const wchar_t* code = LR"(
#: ../src/common/decod.cpp:826
#, no-cpp-format, fuzzy
msgid "Incorrect frame size (%u, %s) for the frame #%u"
Expand All @@ -148,7 +153,9 @@ msgstr "Неправильный размер кадра (%d, %s) для frame #
TEST_CASE("Printf c-format percentage", "[po][l10n]")
{
po_file_review po;
const wchar_t* code = LR"(#: ../src/common/file.cpp:604
const wchar_t* code = LR"(
#: ../src/common/file.cpp:604
#, c-format
msgid "Volume %ld%%."
msgstr "Bolumena: %%%ld")";
Expand All @@ -165,7 +172,9 @@ msgstr "Bolumena: %%%ld")";
TEST_CASE("Printf c-format percentage has issue", "[po][l10n]")
{
po_file_review po;
const wchar_t* code = LR"(#: ../src/common/file.cpp:604
const wchar_t* code = LR"(
#: ../src/common/file.cpp:604
#, c-format
msgid "Volume %ld%%."
msgstr "Bolumena: %%%d")";
Expand All @@ -182,7 +191,9 @@ msgstr "Bolumena: %%%d")";
TEST_CASE("Printf c-format slash", "[po][l10n]")
{
po_file_review po;
const wchar_t* code = LR"(#: ../src/common/file.cpp:604
const wchar_t* code = LR"(
#: ../src/common/file.cpp:604
#, c-format
msgid "%d/%d blocks at 0x%02x"
msgstr "%d%d bloques en 0x%02x")";
Expand All @@ -202,6 +213,7 @@ TEST_CASE("Printf c-format positionals", "[po][l10n]")
{
po_file_review po;
const wchar_t* code = LR"(
#: ../src/common/decod.cpp:826
#, c-format
msgid "Incorrect frame size (%u, %s) for the value %.5f"
Expand All @@ -219,6 +231,7 @@ msgstr "Неправильный размер кадра (%2$s, %1$u) для val
{
po_file_review po;
const wchar_t* code = LR"(
#: ../src/common/decod.cpp:826
#, c-format
msgid "Incorrect frame size (%u, %s) for the value %.5f"
Expand All @@ -236,6 +249,7 @@ msgstr "Неправильный %2$s размер кадра (%2$s, %1$u) дл
{
po_file_review po;
const wchar_t* code = LR"(
#: ../src/common/decod.cpp:826
#, c-format
msgid "Incorrect frame size (%u, %s) for the value %.5f"
Expand All @@ -253,6 +267,7 @@ msgstr "Неправильный %2$s размер кадра (%2$d, %1$u) дл
{
po_file_review po;
const wchar_t* code = LR"(
#: ../src/common/decod.cpp:826
#, c-format
msgid "Incorrect frame size (%u, %s) value"
Expand Down

0 comments on commit ebd452b

Please sign in to comment.