From 2e1ed274c87ba1fca0e68d3e57c2f25451ab289c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa=20S=C3=A1ez?= Date: Wed, 9 Dec 2015 19:47:11 +0100 Subject: [PATCH] unittest: fix TestNGMailAddressParser It had wrong expectation strings --- Tests/Unit/TestNGMailAddressParser.m | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Tests/Unit/TestNGMailAddressParser.m b/Tests/Unit/TestNGMailAddressParser.m index e5118e464..21345a25b 100644 --- a/Tests/Unit/TestNGMailAddressParser.m +++ b/Tests/Unit/TestNGMailAddressParser.m @@ -36,23 +36,22 @@ @"johndown@test.com", // email alone @"", // email between brackets @"\"\" ", // doubled -// @"\"johndown@inverse.ca\" ", // with and without br. - @"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla?= ", // accented full name - @"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla_Bla_Bl=C3=A9?= ", // accented and multiword + @"\"johndown@inverse.ca\" ", // with and without br. + @"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla?= ", // accented full name + @"=?utf-8?q?=C3=80=C3=B1in=C3=A9oblabla_Bla_Bl=C3=A9?= ", // accented and multiword @"John Down \"Bla Bla\" ", // partly quoted @"John Down ", // full name + email @"John, Down ", // 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\" ", // 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); } }