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

Fix more bug. Add autotest for it

parent 7c111188
require "reject";
#SCRIPTNAME: test
reject text:
test \"too\"
.
;
require "reject";
#SCRIPTNAME: test
reject text:
test \"too\"
.
;
......@@ -232,6 +232,8 @@ void SieveEditorGraphicalModeWidgetTest::shouldLoadScripts_data()
QTest::newRow("test-header-multilist-comment") << QStringLiteral("test-header-multilist-comment") << false << true;
QTest::newRow("wierd-script") << QStringLiteral("wierd-script") << false << true;
QTest::newRow("test-text-with-backslash") << QStringLiteral("test-text-with-backslash") << false << true;
}
QTEST_MAIN(SieveEditorGraphicalModeWidgetTest)
......@@ -57,7 +57,7 @@ bool SieveActionEReject::setParamWidgetValue(QXmlStreamReader &element, QWidget
if (tagName == QLatin1String("str")) {
const QString tagValue = element.readElementText();
MultiLineEdit *edit = w->findChild<MultiLineEdit *>(QStringLiteral("rejectmessage"));
edit->setPlainText(AutoCreateScriptUtil::quoteStr(tagValue));
edit->setPlainText(tagValue);
} else if (tagName == QLatin1String("crlf")) {
element.skipCurrentElement();
//nothing
......
......@@ -57,7 +57,7 @@ bool SieveActionReject::setParamWidgetValue(QXmlStreamReader &element, QWidget *
if (tagName == QLatin1String("str")) {
const QString tagValue = element.readElementText();
MultiLineEdit *edit = w->findChild<MultiLineEdit *>(QStringLiteral("rejectmessage"));
edit->setPlainText(AutoCreateScriptUtil::quoteStr(tagValue));
edit->setPlainText(tagValue);
} else if (tagName == QLatin1String("crlf")) {
element.skipCurrentElement();
//nothing
......
......@@ -128,7 +128,6 @@ void XMLPrintingScriptBuilderTest::shouldCreateXml_data()
QTest::newRow("test-comment8") << QStringLiteral("test-comment8")<< true;
QTest::newRow("test-comment9") << QStringLiteral("test-comment9")<< true;
QTest::newRow("test-date1") << QStringLiteral("test-date1")<< true;
}
void XMLPrintingScriptBuilderTest::shouldCreateXml()
......
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