mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-14 01:38:51 +00:00
unittest: fix TestNGMailAddressParser
It had wrong expectation strings
This commit is contained in:
@@ -36,23 +36,22 @@
|
||||
@"johndown@test.com", // email alone
|
||||
@"<johndown@test.com>", // email between brackets
|
||||
@"\"<johndown@test.com>\" <johndown@test.com>", // doubled
|
||||
// @"\"johndown@inverse.ca\" <johndown@test.com>", // with and without br.
|
||||
@"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla?= <wolfgang@test.com>", // accented full name
|
||||
@"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla_Bla_Bl=C3=A9?= <wolfgang@test.com>", // accented and multiword
|
||||
@"\"johndown@inverse.ca\" <johndown@test.com>", // with and without br.
|
||||
@"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla?= <johndown@test.com>", // accented full name
|
||||
@"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla_Bla_Bl=C3=A9?= <johndown@test.com>", // accented and multiword
|
||||
@"John Down \"Bla Bla\" <johndown@test.com>", // partly quoted
|
||||
@"John Down <johndown@test.com>", // full name + email
|
||||
@"John, Down <johndown@test.com>", // full name with comma + email
|
||||
@"john", // name only, no domain
|
||||
nil ];
|
||||
NSArray *expectedAddresses = [NSArray arrayWithObjects:
|
||||
@"johndown@test.com", // email alone
|
||||
@"johndown@test.com", // email between brackets
|
||||
@"johndown@test.com", // email alone
|
||||
@"johndown@test.com", // email between brackets
|
||||
@"johndown@test.com", // doubled
|
||||
// @"\"johndown@inverse.ca\" <johndown@test.com>", // with and without br.
|
||||
@"johndown@test.com", // with and without br.
|
||||
@"johndown@test.com", // accented full name
|
||||
@"johndown@test.com", // accented
|
||||
// and multiword
|
||||
|
||||
/* NOTE: the following are wrong but tolerated for now */
|
||||
@"johndown@test.com", // partly quoted
|
||||
@"johndown@test.com", // full name + email
|
||||
@@ -72,8 +71,8 @@
|
||||
parsedRecipient = [parser parse];
|
||||
result = [parsedRecipient address];
|
||||
error = [NSString
|
||||
stringWithFormat: @"received '%@' instead of '%@' for '%@'",
|
||||
result, currentExp, rawAddress];
|
||||
stringWithFormat: @"[%d] received '%@' instead of '%@' for '%@'",
|
||||
count, result, currentExp, rawAddress];
|
||||
testWithMessage([result isEqualToString: currentExp], error);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user