Commit cae25af9 authored by Laurent Montel's avatar Laurent Montel 😁

Add more autotest

parent f99d6ef8
......@@ -217,7 +217,15 @@ QString AutoCreateScriptUtil::generateConditionComment(const QString &comment)
{
QString strComment;
if (!comment.trimmed().isEmpty()) {
strComment = QStringLiteral(" #") + comment;
const QStringList commentList = comment.split(QLatin1Char('\n'));
for (const QString &str : commentList) {
if (str.isEmpty()) {
strComment += QLatin1Char('\n');
} else {
strComment += QLatin1Char('#') + str + QLatin1Char('\n');
}
}
}
return strComment;
}
if allof (virustest :value "gt" :comparator "i;octet" "0" #condition1
, environment "" "" #condition2
, envelope :all :is "" # condition3
, hasflag :contains "f" "" # condition4
, false
, metadataexists "" "" # condition5
, ihave ""
, environment "" "" /* condition6
continue condition6
again
*/
)
{
}
if allof (virustest :value "gt" :comparator "i;octet" "0" #condition1
, environment "" "" #condition2
, envelope :all :is "" # condition3
, hasflag :contains "f" "" # condition4
, false
, metadataexists "" "" # condition5
, ihave ""
, environment "" "" /* condition6
continue condition6
again
*/
)
{
}
......@@ -205,6 +205,7 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts_data()
QTest::newRow("test-header-value") << QStringLiteral("test-header-value") << false << true;
QTest::newRow("test-comment5") << QStringLiteral("test-comment5") << false << true;
QTest::newRow("test-comment6") << QStringLiteral("test-comment6") << false << true;
}
QTEST_MAIN(SieveEditorGraphicalModeWidgetTest)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment