Commit 8b6391aa authored by Laurent Montel's avatar Laurent Montel 😁

Add more autotest

parent 1fe5a14b
if anyof( allof( header :regex "x-spam-status" "BAYES_[6-9][0-9]",
not header :contains "x-spam-flag" "yes" ),
allof( header :regex "x-spam-status" "BAYES_[0-4][0-9]",
header :contains "x-spam-flag" "yes" ) )
{
fileinto "INBOX/trash";
stop;
}
if anyof( allof( header :regex "x-spam-status" "BAYES_[6-9][0-9]",
not header :contains "x-spam-flag" "yes" ),
allof( header :regex "x-spam-status" "BAYES_[0-4][0-9]",
header :contains "x-spam-flag" "yes" ) )
{
fileinto "INBOX/trash";
stop;
}
......@@ -97,6 +97,8 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts()
QEXPECT_FAIL("foreverypart", "Expected failure on foreverypart file. A lot of parsing errors.", Continue);
QEXPECT_FAIL("test-current-date-custom", "Expected failure on test-current-date-custom file. CurrentDate + variable not implemented.", Continue);
QEXPECT_FAIL("failed-1", "Expected failure on failed-1 file. anyof + allof.", Continue);
QCOMPARE(proc.exitCode(), 0);
}
}
......@@ -177,6 +179,10 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts_data()
QTest::newRow("test-foreverypart-complex") << QStringLiteral("test-foreverypart-complex") << false << true;
QTest::newRow("test-envelop-subadress") << QStringLiteral("test-envelop-subadress") << false << true;
QTest::newRow("test-current-date-custom") << QStringLiteral("test-current-date-custom") << false << true;
//Failed
QTest::newRow("failed-1") << QStringLiteral("failed-1") << true << 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