Skip to content

Commit

Permalink
All format test cases should be under the format directory.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
big-andy-coates committed Jun 22, 2024
1 parent 9fc880b commit fe1b139
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 28 deletions.
14 changes: 0 additions & 14 deletions tests/draft-next/optional/ecmascript-regex.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
16 changes: 16 additions & 0 deletions tests/draft-next/optional/format/ecmascript-regex.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
]
14 changes: 0 additions & 14 deletions tests/draft2020-12/optional/ecmascript-regex.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
16 changes: 16 additions & 0 deletions tests/draft2020-12/optional/format/ecmascript-regex.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
]
File renamed without changes.

0 comments on commit fe1b139

Please sign in to comment.