summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-05-15 14:01:57 +0200
committerMontel Laurent <[email protected]>2017-05-15 14:01:57 +0200
commit9367c3bd27cc1bb7313b361420242f27d558ff96 (patch)
tree1e82b19be0d36f6bc7a26a2ee8135de806a3f8fc
parent82e2fabd912074af0522fe0d1d4444de5eabdab5 (diff)
Add test about comment
-rw-r--r--src/ksieveui/autocreatescripts/autotests/data/test-comment-ref.siv14
-rw-r--r--src/ksieveui/autocreatescripts/autotests/data/test-comment.siv14
-rw-r--r--src/ksieveui/autocreatescripts/autotests/sieveeditorgraphicalmodewidgettest.cpp1
3 files changed, 29 insertions, 0 deletions
diff --git a/src/ksieveui/autocreatescripts/autotests/data/test-comment-ref.siv b/src/ksieveui/autocreatescripts/autotests/data/test-comment-ref.siv
new file mode 100644
index 0000000..30d3da7
--- /dev/null
+++ b/src/ksieveui/autocreatescripts/autotests/data/test-comment-ref.siv
@@ -0,0 +1,14 @@
+require "imap4flags";
+require "fileinto";
+
+#SCRIPTNAME: test1
+if header :is ""
+{
+ #Keep comment
+ #Keep multi line
+ keep :flags [ "\\Answered", "\\Flagged" ];
+} else {
+ #FileInto comment
+ #comment2
+ fileinto "";
+} \ No newline at end of file
diff --git a/src/ksieveui/autocreatescripts/autotests/data/test-comment.siv b/src/ksieveui/autocreatescripts/autotests/data/test-comment.siv
new file mode 100644
index 0000000..b30c66e
--- /dev/null
+++ b/src/ksieveui/autocreatescripts/autotests/data/test-comment.siv
@@ -0,0 +1,14 @@
+require "imapflags";
+require "fileinto";
+
+#SCRIPTNAME: test1
+if header :is ""
+{
+ #Keep comment
+ #Keep multi line
+ keep :flags [ "\\Answered", "\\Flagged" ];
+} else {
+ #FileInto comment
+ #comment2
+ fileinto "";
+}
diff --git a/src/ksieveui/autocreatescripts/autotests/sieveeditorgraphicalmodewidgettest.cpp b/src/ksieveui/autocreatescripts/autotests/sieveeditorgraphicalmodewidgettest.cpp
index 8a0691a..8838efa 100644
--- a/src/ksieveui/autocreatescripts/autotests/sieveeditorgraphicalmodewidgettest.cpp
+++ b/src/ksieveui/autocreatescripts/autotests/sieveeditorgraphicalmodewidgettest.cpp
@@ -155,6 +155,7 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts_data()
//We need to fix it.
QTest::newRow("regexp") << QStringLiteral("regexp") << true << true;
QTest::newRow("comparator") << QStringLiteral("comparator") << false << true;
+ QTest::newRow("test-comment") << QStringLiteral("test-comment") << false << true;
}
QTEST_MAIN(SieveEditorGraphicalModeWidgetTest)