Commit 12eafbeb authored by Laurent Montel's avatar Laurent Montel 😁

Add more autotests

parent 063b5caf
require "";
#SCRIPTNAME: Partie du script 0
if address :all :is "From" "someone@example.org"
{
}
\ No newline at end of file
require "imapflags";
if address "From" "someone@example.org" {
setflag "\\Seen";
}
...@@ -66,8 +66,8 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts() ...@@ -66,8 +66,8 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts()
f.write(generatedScript.toUtf8()); f.write(generatedScript.toUtf8());
f.close(); f.close();
qDebug() << " generatedScript" << generatedScript; //qDebug() << " generatedScript" << generatedScript;
//TODO compare script.
// compare to reference file // compare to reference file
QStringList args = QStringList() QStringList args = QStringList()
<< QStringLiteral("-u") << QStringLiteral("-u")
...@@ -88,6 +88,7 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts_data() ...@@ -88,6 +88,7 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts_data()
QTest::addColumn<bool>("hasError"); QTest::addColumn<bool>("hasError");
QTest::addColumn<bool>("success"); QTest::addColumn<bool>("success");
QTest::newRow("emptyscript") << QStringLiteral("empty") << false << true;
QTest::newRow("simplescript") << QStringLiteral("simple") << false << true; QTest::newRow("simplescript") << QStringLiteral("simple") << false << true;
} }
......
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