Commit 6c2fdf6f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add more autotest

parent a468718c
foreverypart :name "dd"
{
if allof (
header :mime :param "filename" :contains
"Content-Disposition" "important",
header :mime :subtype "Content-Type" "pdf",
size :over "100K")
{
fileinto "INBOX.important";
break;
}
}
foreverypart :name "dd"
{
if allof (
header :mime :param "filename" :contains
"Content-Disposition" "important",
header :mime :subtype "Content-Type" "pdf",
size :over "100K")
{
fileinto "INBOX.important";
break;
}
}
# < create a problem during parsing require "editheader";
#SCRIPTNAME: Script part 0
# " create a problem during parsing
addheader "X-Sieve-Filtered" "<kim@job.example.com>"; addheader "X-Sieve-Filtered" "<kim@job.example.com>";
...@@ -96,6 +96,7 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts() ...@@ -96,6 +96,7 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts()
QEXPECT_FAIL("test-date", "Expected failure on date file. We depend against current date", Continue); QEXPECT_FAIL("test-date", "Expected failure on date file. We depend against current date", Continue);
QEXPECT_FAIL("problem-with-inferior-char", "Expected failure on problem-with-inferior-char file. \"<\" is start of tag... => it will create problem", Continue); QEXPECT_FAIL("problem-with-inferior-char", "Expected failure on problem-with-inferior-char file. \"<\" is start of tag... => it will create problem", Continue);
QEXPECT_FAIL("delete-headers-with-index", "Expected failure on delete-headers-with-index file. We depend against \"index\" feature", Continue); QEXPECT_FAIL("delete-headers-with-index", "Expected failure on delete-headers-with-index file. We depend against \"index\" feature", Continue);
QEXPECT_FAIL("foreverypart", "Expected failure on foreverypart file. A lot of parsing errors.", Continue);
QCOMPARE(proc.exitCode(), 0); QCOMPARE(proc.exitCode(), 0);
} }
} }
...@@ -163,13 +164,14 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts_data() ...@@ -163,13 +164,14 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts_data()
QTest::newRow("hasflag") << QStringLiteral("hasflag") << false << true; QTest::newRow("hasflag") << QStringLiteral("hasflag") << false << true;
QTest::newRow("setflag") << QStringLiteral("setflag") << false << true; QTest::newRow("setflag") << QStringLiteral("setflag") << false << true;
QTest::newRow("add-header") << QStringLiteral("add-header") << false << true; QTest::newRow("add-header") << QStringLiteral("add-header") << false << true;
//We need to fix it
QTest::newRow("problem-with-inferior-char") << QStringLiteral("problem-with-inferior-char") << false << true; QTest::newRow("problem-with-inferior-char") << QStringLiteral("problem-with-inferior-char") << false << true;
//We need to implement index support //We need to implement index support
QTest::newRow("delete-headers-with-index") << QStringLiteral("delete-headers-with-index") << true << true; QTest::newRow("delete-headers-with-index") << QStringLiteral("delete-headers-with-index") << true << true;
QTest::newRow("notify-2") << QStringLiteral("notify-2") << false << true; QTest::newRow("notify-2") << QStringLiteral("notify-2") << false << true;
QTest::newRow("foreverypart") << QStringLiteral("foreverypart") << true << true;
} }
QTEST_MAIN(SieveEditorGraphicalModeWidgetTest) 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