From aecf038c7270fdd638b555467c82f6eccf269a1d Mon Sep 17 00:00:00 2001 From: Patrick Roemer Date: Thu, 2 Oct 2025 08:39:11 +0200 Subject: [PATCH] add test for invalid extended year in date-time format (#781) --- tests/draft-next/optional/format/date-time.json | 5 +++++ tests/draft2019-09/optional/format/date-time.json | 5 +++++ tests/draft2020-12/optional/format/date-time.json | 5 +++++ tests/draft3/optional/format/date-time.json | 5 +++++ tests/draft4/optional/format/date-time.json | 5 +++++ tests/draft6/optional/format/date-time.json | 5 +++++ tests/draft7/optional/format/date-time.json | 5 +++++ 7 files changed, 35 insertions(+) diff --git a/tests/draft-next/optional/format/date-time.json b/tests/draft-next/optional/format/date-time.json index e25845b0..c41ceda0 100644 --- a/tests/draft-next/optional/format/date-time.json +++ b/tests/draft-next/optional/format/date-time.json @@ -130,6 +130,11 @@ "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", "data": "1963-06-11T0৪:00:00Z", "valid": false + }, + { + "description": "invalid extended year", + "data": "+11963-06-19T08:30:06.283185Z", + "valid": false } ] } diff --git a/tests/draft2019-09/optional/format/date-time.json b/tests/draft2019-09/optional/format/date-time.json index 731001d5..ae837299 100644 --- a/tests/draft2019-09/optional/format/date-time.json +++ b/tests/draft2019-09/optional/format/date-time.json @@ -130,6 +130,11 @@ "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", "data": "1963-06-11T0৪:00:00Z", "valid": false + }, + { + "description": "invalid extended year", + "data": "+11963-06-19T08:30:06.283185Z", + "valid": false } ] } diff --git a/tests/draft2020-12/optional/format/date-time.json b/tests/draft2020-12/optional/format/date-time.json index 8783d732..c764a173 100644 --- a/tests/draft2020-12/optional/format/date-time.json +++ b/tests/draft2020-12/optional/format/date-time.json @@ -130,6 +130,11 @@ "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", "data": "1963-06-11T0৪:00:00Z", "valid": false + }, + { + "description": "invalid extended year", + "data": "+11963-06-19T08:30:06.283185Z", + "valid": false } ] } diff --git a/tests/draft3/optional/format/date-time.json b/tests/draft3/optional/format/date-time.json index 1f1e6fb3..89e6b72f 100644 --- a/tests/draft3/optional/format/date-time.json +++ b/tests/draft3/optional/format/date-time.json @@ -32,6 +32,11 @@ "description": "invalid non-padded day dates", "data": "1963-06-1T08:30:06.283185Z", "valid": false + }, + { + "description": "invalid extended year", + "data": "+11963-06-19T08:30:06.283185Z", + "valid": false } ] } diff --git a/tests/draft4/optional/format/date-time.json b/tests/draft4/optional/format/date-time.json index 09112737..810ac20b 100644 --- a/tests/draft4/optional/format/date-time.json +++ b/tests/draft4/optional/format/date-time.json @@ -127,6 +127,11 @@ "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", "data": "1963-06-11T0৪:00:00Z", "valid": false + }, + { + "description": "invalid extended year", + "data": "+11963-06-19T08:30:06.283185Z", + "valid": false } ] } diff --git a/tests/draft6/optional/format/date-time.json b/tests/draft6/optional/format/date-time.json index 09112737..810ac20b 100644 --- a/tests/draft6/optional/format/date-time.json +++ b/tests/draft6/optional/format/date-time.json @@ -127,6 +127,11 @@ "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", "data": "1963-06-11T0৪:00:00Z", "valid": false + }, + { + "description": "invalid extended year", + "data": "+11963-06-19T08:30:06.283185Z", + "valid": false } ] } diff --git a/tests/draft7/optional/format/date-time.json b/tests/draft7/optional/format/date-time.json index 09112737..810ac20b 100644 --- a/tests/draft7/optional/format/date-time.json +++ b/tests/draft7/optional/format/date-time.json @@ -127,6 +127,11 @@ "description": "invalid non-ASCII '৪' (a Bengali 4) in time portion", "data": "1963-06-11T0৪:00:00Z", "valid": false + }, + { + "description": "invalid extended year", + "data": "+11963-06-19T08:30:06.283185Z", + "valid": false } ] }