Skip to content

Commit

Permalink
Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Dec 31, 2024
1 parent 0ff962b commit abf8c20
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions tests/potests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,44 +576,6 @@ msgstr "Name Address City State ")";
CHECK(issues == 0);
}

TEST_CASE("Multipart strings pipes", "[po][l10n]")
{
po_file_review po(false);
po.set_style(check_multipart_strings);
const wchar_t* code = LR"(
#: ../src/common/file.cpp:604
msgid "Name|Address|City|State"
msgstr "Name Address City State ")";

po(code, L"");
po.review_strings([](size_t){}, [](size_t, const std::filesystem::path&){ return true; });

const auto issues = std::count_if(
po.get_catalog_entries().cbegin(), po.get_catalog_entries().cend(), [](const auto& ent)
{ return ent.second.m_issues.size() > 0; });
CHECK(issues == 1);
}

TEST_CASE("Multipart strings pipes nonissue", "[po][l10n]")
{
po_file_review po(false);
po.set_style(check_multipart_strings);
const wchar_t* code = LR"(
#: ../src/common/file.cpp:604
msgid "Comma Separated Values (*.csv)|*.csv|Tab-delimited Text (*.txt)|*.txt"
msgstr "Name Address City State ")";

po(code, L"");
po.review_strings([](size_t){}, [](size_t, const std::filesystem::path&){ return true; });

const auto issues = std::count_if(
po.get_catalog_entries().cbegin(), po.get_catalog_entries().cend(), [](const auto& ent)
{ return ent.second.m_issues.size() > 0; });
CHECK(issues == 0);
}

TEST_CASE("Multipart strings tabs", "[po][l10n]")
{
po_file_review po(false);
Expand Down

0 comments on commit abf8c20

Please sign in to comment.