From fe1b1392e14ce6008bde3f614271dbf60678ea01 Mon Sep 17 00:00:00 2001 From: Big Andy <8012398+big-andy-coates@users.noreply.github.com> Date: Sat, 22 Jun 2024 12:50:10 +0100 Subject: [PATCH] All format test cases should be under the `format` directory. Currently, there exists an ecma regex test case that uses `"format": "regex"`. My understanding was that all tests that require format validation where implemented under the `optional/format` directory. (As per point #2 of https://github.com/json-schema-org/JSON-Schema-Test-Suite/blob/9fc880bfb6d8ccd093bc82431f17d13681ffae8e/README.md#additional-assumptions). As such, this change moves the test requiring `format` under the `optional/format` directory. --- tests/draft-next/optional/ecmascript-regex.json | 14 -------------- .../optional/format/ecmascript-regex.json | 16 ++++++++++++++++ .../draft2020-12/optional/ecmascript-regex.json | 14 -------------- .../optional/format/ecmascript-regex.json | 16 ++++++++++++++++ .../optional/{ => format}/ecmascript-regex.json | 0 5 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 tests/draft-next/optional/format/ecmascript-regex.json create mode 100644 tests/draft2020-12/optional/format/ecmascript-regex.json rename tests/draft3/optional/{ => format}/ecmascript-regex.json (100%) diff --git a/tests/draft-next/optional/ecmascript-regex.json b/tests/draft-next/optional/ecmascript-regex.json index c96d4e05..a1a4f963 100644 --- a/tests/draft-next/optional/ecmascript-regex.json +++ b/tests/draft-next/optional/ecmascript-regex.json @@ -405,20 +405,6 @@ } ] }, - { - "description": "\\a is not an ECMA 262 control escape", - "schema": { - "$schema": "https://json-schema.org/draft/next/schema", - "format": "regex" - }, - "tests": [ - { - "description": "when used as a pattern", - "data": "\\a", - "valid": false - } - ] - }, { "description": "pattern with non-ASCII digits", "schema": { diff --git a/tests/draft-next/optional/format/ecmascript-regex.json b/tests/draft-next/optional/format/ecmascript-regex.json new file mode 100644 index 00000000..1e19c272 --- /dev/null +++ b/tests/draft-next/optional/format/ecmascript-regex.json @@ -0,0 +1,16 @@ +[ + { + "description": "\\a is not an ECMA 262 control escape", + "schema": { + "$schema": "https://json-schema.org/draft/next/schema", + "format": "regex" + }, + "tests": [ + { + "description": "when used as a pattern", + "data": "\\a", + "valid": false + } + ] + } +] diff --git a/tests/draft2020-12/optional/ecmascript-regex.json b/tests/draft2020-12/optional/ecmascript-regex.json index 97649531..a4d62e0c 100644 --- a/tests/draft2020-12/optional/ecmascript-regex.json +++ b/tests/draft2020-12/optional/ecmascript-regex.json @@ -405,20 +405,6 @@ } ] }, - { - "description": "\\a is not an ECMA 262 control escape", - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "format": "regex" - }, - "tests": [ - { - "description": "when used as a pattern", - "data": "\\a", - "valid": false - } - ] - }, { "description": "pattern with non-ASCII digits", "schema": { diff --git a/tests/draft2020-12/optional/format/ecmascript-regex.json b/tests/draft2020-12/optional/format/ecmascript-regex.json new file mode 100644 index 00000000..b0648084 --- /dev/null +++ b/tests/draft2020-12/optional/format/ecmascript-regex.json @@ -0,0 +1,16 @@ +[ + { + "description": "\\a is not an ECMA 262 control escape", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "format": "regex" + }, + "tests": [ + { + "description": "when used as a pattern", + "data": "\\a", + "valid": false + } + ] + } +] \ No newline at end of file diff --git a/tests/draft3/optional/ecmascript-regex.json b/tests/draft3/optional/format/ecmascript-regex.json similarity index 100% rename from tests/draft3/optional/ecmascript-regex.json rename to tests/draft3/optional/format/ecmascript-regex.json