Commit 49e40321 authored by Laurent Montel's avatar Laurent Montel 😁

Add more autotests + find a bug in set variable

parent 2f5369b3
require "ihave";
require "imap4flags";
#SCRIPTNAME: Script part 0
#Script name: add-single-flag
if ihave "reject"
{
addflag [ "\\Seen" ];
}
\ No newline at end of file
require "ihave";
require "imapflags";
#Script name: add-single-flag
if ihave "reject"
{
addflag [ "\\Seen" ];
}
require "fileinto";
require "copy";
require "mailbox";
#SCRIPTNAME: Script part 0
#Script name: scriptname
if header :is "Content-Type" "png"
{
fileinto :copy :create "INBOX";
}
\ No newline at end of file
require "fileinto";
require "copy";
require "mailbox";
#Script name: scriptname
if header :is "Content-Type" "png"
{
fileinto :copy :create "INBOX";
}
require "include";
require "include";
require "spamtest";
require "relational";
require "comparator-i;ascii-numeric";
require "enclose";
#Script name: include
include :personal "toto.siv";
global "global-variable";
set "test-variable" "25";
if virustest :value "gt" :comparator "i;ascii-numeric" "5"
{
enclose :subject "toto" :headers "subject" text:
text to displaying
.
;
}
require "include";
require "include";
require "spamtest";
require "relational";
require "comparator-i;ascii-numeric";
require "enclose";
#Script name: include
include :personal "toto.siv";
global "global-variable";
set "test-variable" "25";
if virustest :value "gt" :comparator "i;ascii-numeric" "5"
{
enclose :subject "toto" :headers "subject" text:
text to displaying
.
;
}
......@@ -92,6 +92,7 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts()
QVERIFY(proc.waitForFinished());
QEXPECT_FAIL("test-current-date" , "Expected failure on delete-headers file", Continue);
QEXPECT_FAIL("include" , "Expected failure on \"include\" file. Pb with \"set\" variable ", Continue);
QCOMPARE(proc.exitCode(), 0);
}
}
......@@ -123,7 +124,11 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts_data()
QTest::newRow("delete-headers") << QStringLiteral("delete-headers") << false << true;
QTest::newRow("mailboxexist") << QStringLiteral("mailboxexist") << false << true;
QTest::newRow("extract-text") << QStringLiteral("extract-text") << false << true;
QTest::newRow("eenclose") << QStringLiteral("enclose") << false << true;
QTest::newRow("enclose") << QStringLiteral("enclose") << false << true;
QTest::newRow("add-single-flag") << QStringLiteral("add-single-flag") << false << true;
QTest::newRow("fileinfo") << QStringLiteral("fileinfo") << false << true;
//Need to fix : "set" variable
QTest::newRow("include") << QStringLiteral("include") << 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