Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Unmaintained
KDE Pim
Commits
74ecbae2
Commit
74ecbae2
authored
Jan 01, 2015
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor optimization
parent
0f750a88
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
+18
-17
templateparser/tests/templateparsertest.cpp
templateparser/tests/templateparsertest.cpp
+18
-17
No files found.
templateparser/tests/templateparsertest.cpp
View file @
74ecbae2
...
...
@@ -172,23 +172,24 @@ void TemplateParserTester::test_processWithTemplatesForContent_data()
QDir
dir
(
QLatin1String
(
MAIL_DATA_DIR
)
);
foreach
(
const
QString
&
file
,
dir
.
entryList
(
QStringList
(
QLatin1String
(
"plain*.mbox"
)),
QDir
::
Files
|
QDir
::
Readable
|
QDir
::
NoSymLinks
)
)
{
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTIME"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"11:30"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTIMELONG"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"11:30:27"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTIMELONGEN"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"11:30:27"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%ODATE"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"Sunday 07 August 2011"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%ODATESHORT"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"2011-08-07"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%ODATEEN"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"Sunday 07 August 2011"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OFULLSUBJ"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"Plain Message Test"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OFULLSUBJECT"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"Plain Message Test"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OFROMFNAME"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"Sudhendu"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OFROMLNAME"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"Kumar"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OFROMNAME"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"Sudhendu Kumar"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OFROMADDR"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"Sudhendu Kumar <dontspamme@yoohoo.com>"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTOADDR"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"kde <foo@yoohoo.org>"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTOFNAME"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"kde"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTONAME"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"kde"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTOLNAME"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
""
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTOLIST"
<<
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
)
<<
"kde <foo@yoohoo.org>"
;
const
QString
fileName
=
QString
(
dir
.
path
()
+
QLatin1Char
(
'/'
)
+
file
);
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTIME"
<<
fileName
<<
"11:30"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTIMELONG"
<<
fileName
<<
"11:30:27"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTIMELONGEN"
<<
fileName
<<
"11:30:27"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%ODATE"
<<
fileName
<<
"Sunday 07 August 2011"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%ODATESHORT"
<<
fileName
<<
"2011-08-07"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%ODATEEN"
<<
fileName
<<
"Sunday 07 August 2011"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OFULLSUBJ"
<<
fileName
<<
"Plain Message Test"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OFULLSUBJECT"
<<
fileName
<<
"Plain Message Test"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OFROMFNAME"
<<
fileName
<<
"Sudhendu"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OFROMLNAME"
<<
fileName
<<
"Kumar"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OFROMNAME"
<<
fileName
<<
"Sudhendu Kumar"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OFROMADDR"
<<
fileName
<<
"Sudhendu Kumar <dontspamme@yoohoo.com>"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTOADDR"
<<
fileName
<<
"kde <foo@yoohoo.org>"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTOFNAME"
<<
fileName
<<
"kde"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTONAME"
<<
fileName
<<
"kde"
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTOLNAME"
<<
fileName
<<
""
;
QTest
::
newRow
(
file
.
toLatin1
()
)
<<
"%OTOLIST"
<<
fileName
<<
"kde <foo@yoohoo.org>"
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment