Skip to content

fix optional test locations #382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
[
{
"description": "ECMA 262 regex non-compliance",
"schema": { "format": "regex" },
"tests": [
{
"description": "ECMA 262 has no support for \\Z anchor from .NET",
"data": "^\\S(|(.|\\n)*\\S)\\Z",
"valid": false
}
]
},
{
"description": "ECMA 262 regex $ does not match trailing newline",
"schema": {
Expand Down Expand Up @@ -209,5 +198,16 @@
"valid": true
}
]
},
{
"description": "ECMA 262 regex non-compliance",
"schema": { "format": "regex" },
"tests": [
{
"description": "ECMA 262 has no support for \\Z anchor from .NET",
"data": "^\\S(|(.|\\n)*\\S)\\Z",
"valid": false
}
]
}
]
227 changes: 0 additions & 227 deletions tests/draft3/optional/format.json

This file was deleted.

38 changes: 38 additions & 0 deletions tests/draft3/optional/format/color.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[
{
"description": "validation of CSS colors",
"schema": {"format": "color"},
"tests": [
{
"description": "a valid CSS color name",
"data": "fuchsia",
"valid": true
},
{
"description": "a valid six-digit CSS color code",
"data": "#CC8899",
"valid": true
},
{
"description": "a valid three-digit CSS color code",
"data": "#C89",
"valid": true
},
{
"description": "an invalid CSS color code",
"data": "#00332520",
"valid": false
},
{
"description": "an invalid CSS color name",
"data": "puce",
"valid": false
},
{
"description": "a CSS color name containing invalid characters",
"data": "light_grayish_red-violet",
"valid": false
}
]
}
]
28 changes: 28 additions & 0 deletions tests/draft3/optional/format/date-time.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[
{
"description": "validation of date-time strings",
"schema": {"format": "date-time"},
"tests": [
{
"description": "a valid date-time string",
"data": "1963-06-19T08:30:06.283185Z",
"valid": true
},
{
"description": "an invalid date-time string",
"data": "06/19/1963 08:30:06 PST",
"valid": false
},
{
"description": "case-insensitive T and Z",
"data": "1963-06-19t08:30:06.283185z",
"valid": true
},
{
"description": "only RFC3339 not all of ISO 8601 are valid",
"data": "2013-350T01:01:01",
"valid": false
}
]
}
]
18 changes: 18 additions & 0 deletions tests/draft3/optional/format/date.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"description": "validation of date strings",
"schema": {"format": "date"},
"tests": [
{
"description": "a valid date string",
"data": "1963-06-19",
"valid": true
},
{
"description": "an invalid date string",
"data": "06/19/1963",
"valid": false
}
]
}
]
18 changes: 18 additions & 0 deletions tests/draft3/optional/format/email.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"description": "validation of e-mail addresses",
"schema": {"format": "email"},
"tests": [
{
"description": "a valid e-mail address",
"data": "[email protected]",
"valid": true
},
{
"description": "an invalid e-mail address",
"data": "2962",
"valid": false
}
]
}
]
28 changes: 28 additions & 0 deletions tests/draft3/optional/format/host-name.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[
{
"description": "validation of host names",
"schema": {"format": "host-name"},
"tests": [
{
"description": "a valid host name",
"data": "www.example.com",
"valid": true
},
{
"description": "a host name starting with an illegal character",
"data": "-a-host-name-that-starts-with--",
"valid": false
},
{
"description": "a host name containing illegal characters",
"data": "not_a_valid_host_name",
"valid": false
},
{
"description": "a host name with a component too long",
"data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component",
"valid": false
}
]
}
]
Loading