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

Add more test

parent 80c49171
require ["variables","date","fileinto","mailbox"];
# Extract date info
if currentdate :matches "year" "*" { set "year" "${1}"; }
if currentdate :matches "month" "*" { set "month" "${1}"; }
# Archive Dovecot mailing list items by year and month.
# Create folder when it does not exist.
if header :is "list-id" "dovecot.dovecot.org" {
fileinto :create "INBOX.Lists.${year}.${month}.dovecot";
}
require ["variables","date","fileinto","mailbox"];
# Extract date info
if currentdate :matches "year" "*" { set "year" "${1}"; }
if currentdate :matches "month" "*" { set "month" "${1}"; }
# Archive Dovecot mailing list items by year and month.
# Create folder when it does not exist.
if header :is "list-id" "dovecot.dovecot.org" {
fileinto :create "INBOX.Lists.${year}.${month}.dovecot";
}
...@@ -95,6 +95,8 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts() ...@@ -95,6 +95,8 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts()
QEXPECT_FAIL("test-current-date", "Expected failure on current-date file. We depend against current date", Continue); QEXPECT_FAIL("test-current-date", "Expected failure on current-date file. We depend against current date", 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); 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);
QCOMPARE(proc.exitCode(), 0); QCOMPARE(proc.exitCode(), 0);
} }
} }
...@@ -174,6 +176,7 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts_data() ...@@ -174,6 +176,7 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts_data()
QTest::newRow("test-foreverypart-complex") << QStringLiteral("test-foreverypart-complex") << false << true; 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-envelop-subadress") << QStringLiteral("test-envelop-subadress") << false << true;
QTest::newRow("test-current-date-custom") << QStringLiteral("test-current-date-custom") << false << 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