This commit is contained in:
J. Nick Koston
2026-01-29 22:31:23 -06:00
parent 973105f2e5
commit bec7d6d223
2 changed files with 26 additions and 6 deletions
+18
View File
@@ -361,6 +361,24 @@ TEST(PosixTzParser, MFormatInvalidDayOfWeek7) {
EXPECT_FALSE(parse_posix_tz("EST5EDT,M3.2.7,M11.1.0", tz));
}
TEST(PosixTzParser, MissingEndRule) {
ParsedTimezone tz;
// POSIX requires both start and end rules if any rules are specified
EXPECT_FALSE(parse_posix_tz("EST5EDT,M3.2.0", tz));
}
TEST(PosixTzParser, MissingEndRuleJFormat) {
ParsedTimezone tz;
// POSIX requires both start and end rules if any rules are specified
EXPECT_FALSE(parse_posix_tz("EST5EDT,J60", tz));
}
TEST(PosixTzParser, MissingEndRulePlainDay) {
ParsedTimezone tz;
// POSIX requires both start and end rules if any rules are specified
EXPECT_FALSE(parse_posix_tz("EST5EDT,60", tz));
}
// ============================================================================
// Large offset tests
// ============================================================================