aboutsummaryrefslogtreecommitdiffhomepage
path: root/unittest
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-11-25 20:52:14 -0800
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-11-25 20:52:14 -0800
commit39b030fe51f04550cd580be5f93be5a3d9deab5f (patch)
treebfc949864e3e6361a9a794d3aaeedc19a0a95449 /unittest
parent6d8dfe737e5b6fc9a502868705d8553386d314fc (diff)
More tweaks on date
Diffstat (limited to 'unittest')
-rw-r--r--unittest/unittest.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/unittest/unittest.cpp b/unittest/unittest.cpp
index c74e2818..8cf9908b 100644
--- a/unittest/unittest.cpp
+++ b/unittest/unittest.cpp
@@ -260,8 +260,7 @@ static void testCharsetDetection(String * path)
static String * tweakDateFromSummary(String * summary) {
Array * components = summary->componentsSeparatedByString(MCSTR("\n"));
- if (components->count() >= 4) {
- String * line = (String *) components->objectAtIndex(3);
+ mc_foreacharray(String, line, components) {
if (line->hasPrefix(MCSTR("Date:"))) {
line->replaceOccurrencesOfString(MCSTR(" at "), MCSTR(" "));
}