// 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 = " "; 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"