From d3261e64152397db2dca4d691a990c6bc2a6f4dd Mon Sep 17 00:00:00 2001 From: Mehmet Samet Duman Date: Thu, 2 Apr 2026 18:51:45 +0300 Subject: NOISSUE add archived projects Signed-off-by: Mehmet Samet Duman --- .../tests/StringUtilsHtmlPatch_test.cpp | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 archived/projt-launcher/tests/StringUtilsHtmlPatch_test.cpp (limited to 'archived/projt-launcher/tests/StringUtilsHtmlPatch_test.cpp') diff --git a/archived/projt-launcher/tests/StringUtilsHtmlPatch_test.cpp b/archived/projt-launcher/tests/StringUtilsHtmlPatch_test.cpp new file mode 100644 index 0000000000..0f4b7009eb --- /dev/null +++ b/archived/projt-launcher/tests/StringUtilsHtmlPatch_test.cpp @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: GPL-3.0-only +// SPDX-FileCopyrightText: 2026 Project Tick +// SPDX-FileContributor: Project Tick Team + +#include + +#include + +class StringUtilsHtmlPatchTest : public QObject +{ + Q_OBJECT + + private slots: + void test_insertsBreakBeforeImage() + { + const QString html = "
  • a
"; + const QString patched = StringUtils::htmlListPatch(html); + QVERIFY(patched.contains("
")); + } + + void test_noBreakWhenTextExists() + { + const QString html = "
    text "; + const QString patched = StringUtils::htmlListPatch(html); + QVERIFY(!patched.contains("
    ")); + } + + void test_multipleLists() + { + const QString html = "
        "; + const QString patched = StringUtils::htmlListPatch(html); + QCOMPARE(patched.count("
        "), 2); + } +}; + +QTEST_GUILESS_MAIN(StringUtilsHtmlPatchTest) + +#include "StringUtilsHtmlPatch_test.moc" -- cgit 0.0.5-2-1-g0f52