Monotone-Parent: 859bf2013653e0366336126b6d00368fe0dbc147

Monotone-Revision: ed35a0aec1eed0f78e69e747bdd6871d62118111

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-02-21T19:52:40
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2012-02-21 19:52:40 +00:00
parent 1655d27dbe
commit 966149f804
2 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2012-02-21 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Tests/Unit/TestSBJsonParser.m (-test_parseJSONString): added a
line for escaped characters.
* SoObjects/Appointments/SOGoAppointmentFolders.m
(-davEventsDefaultClassification,)
(setDavEventsDefaultClassification:)

View File

@ -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;
}
}