From b4ddb638f0094be98c3cb3f7ea51c4beeba220a4 Mon Sep 17 00:00:00 2001 From: Martin Tournoij Date: Thu, 23 May 2024 13:16:11 +0100 Subject: [PATCH] Add tests for invalid timezone offsets https://github.com/BurntSushi/toml/issues/407 --- tests/invalid/datetime/offset-overflow-hour.toml | 2 ++ tests/invalid/datetime/offset-overflow-minute.toml | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 tests/invalid/datetime/offset-overflow-hour.toml create mode 100644 tests/invalid/datetime/offset-overflow-minute.toml diff --git a/tests/invalid/datetime/offset-overflow-hour.toml b/tests/invalid/datetime/offset-overflow-hour.toml new file mode 100644 index 0000000..2c85d56 --- /dev/null +++ b/tests/invalid/datetime/offset-overflow-hour.toml @@ -0,0 +1,2 @@ +# Hour must be 00-24 +d = 1985-06-18 17:04:07+25:00 diff --git a/tests/invalid/datetime/offset-overflow-minute.toml b/tests/invalid/datetime/offset-overflow-minute.toml new file mode 100644 index 0000000..fdcadc5 --- /dev/null +++ b/tests/invalid/datetime/offset-overflow-minute.toml @@ -0,0 +1,3 @@ +# Minute must be 00-59; we allow 60 too because some people do write offsets of +# 60 minutes +d = 1985-06-18 17:04:07+12:61