From 6c51f05bd79e984ff321c4cb52c7ce0bcbab3c84 Mon Sep 17 00:00:00 2001 From: Peter Hosey Date: Wed, 26 Mar 2014 00:00:05 -0700 Subject: [PATCH] Test case for #31. --- .../ISO8601ForCocoaCalendarDateTests.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ISO8601ForCocoa/ISO8601ForCocoaTests/ISO8601ForCocoaCalendarDateTests.m b/ISO8601ForCocoa/ISO8601ForCocoaTests/ISO8601ForCocoaCalendarDateTests.m index c4a1f61..51c902d 100644 --- a/ISO8601ForCocoa/ISO8601ForCocoaTests/ISO8601ForCocoaCalendarDateTests.m +++ b/ISO8601ForCocoa/ISO8601ForCocoaTests/ISO8601ForCocoaCalendarDateTests.m @@ -369,6 +369,13 @@ - (void) testUnparsingDateWithinBritishSummerTimeAsUTC { STAssertEqualObjects(string, expectedString, @"Got wrong string for September date in UTC-as-default (check whether DST is included in TZ offset)"); } +//https://github.com/boredzo/iso-8601-date-formatter/issues/31 +- (void) testParsingOctober9th2013 { + NSDate *date = [_iso8601DateFormatter dateFromString:@"2013-10-09T13:00:00Z"]; + //#31 is a crash, so we shouldn't even get here. + STAssertNotNil(date, @"1 PM UTC on October 9th, 2013 should not be nil"); +} + - (void) testStrictModeRejectsSlashyDates { _iso8601DateFormatter.parsesStrictly = true;