From 966149f804cad2b469e60ed76ceb4d7312c49afb Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 21 Feb 2012 19:52:40 +0000 Subject: [PATCH] Monotone-Parent: 859bf2013653e0366336126b6d00368fe0dbc147 Monotone-Revision: ed35a0aec1eed0f78e69e747bdd6871d62118111 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-02-21T19:52:40 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ Tests/Unit/TestSBJsonParser.m | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e1364034b..05b3db453 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2012-02-21 Wolfgang Sourdeau + * Tests/Unit/TestSBJsonParser.m (-test_parseJSONString): added a + line for escaped characters. + * SoObjects/Appointments/SOGoAppointmentFolders.m (-davEventsDefaultClassification,) (setDavEventsDefaultClassification:) diff --git a/Tests/Unit/TestSBJsonParser.m b/Tests/Unit/TestSBJsonParser.m index b8e273b0a..c071b534d 100644 --- a/Tests/Unit/TestSBJsonParser.m +++ b/Tests/Unit/TestSBJsonParser.m @@ -46,22 +46,24 @@ @"\"\\u0041\"", @"A", @"\"\\u000A\"", @"\n", @"\"\\u000a\"", @"\n", + @"\"weird data \\\\ ' \\\"; ^\"", @"weird data \\ ' \"; ^", nil }; parser = [SBJsonParser new]; [parser autorelease]; + count = 0; - while ((currentString = testStrings[count * 2])) + while ((currentString = testStrings[count])) { resultObject = [parser objectWithString: [NSString stringWithFormat: @"[%@]", currentString]]; - expected = [NSArray arrayWithObject: testStrings[count * 2 + 1]]; + expected = [NSArray arrayWithObject: testStrings[count + 1]]; error = [NSString stringWithFormat: @"objects '%@' and '%@' differs (count: %d)", expected, resultObject, count]; testEqualsWithMessage(expected, resultObject, error); - count++; + count += 2; } }