Skip to content

Commit ca14e01

Browse files
Merge branch 'pull/382'
fix optional test locations - move format tests to their own directory, for consistency - move non-format tests out of the format directory that were put there by mistake (closes #382)
2 parents 4bae8aa + 3dabf55 commit ca14e01

30 files changed

+1121
-1076
lines changed

tests/draft3/optional/format.json

-262
This file was deleted.
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[
2+
{
3+
"description": "validation of CSS colors",
4+
"schema": {"format": "color"},
5+
"tests": [
6+
{
7+
"description": "a valid CSS color name",
8+
"data": "fuchsia",
9+
"valid": true
10+
},
11+
{
12+
"description": "a valid six-digit CSS color code",
13+
"data": "#CC8899",
14+
"valid": true
15+
},
16+
{
17+
"description": "a valid three-digit CSS color code",
18+
"data": "#C89",
19+
"valid": true
20+
},
21+
{
22+
"description": "an invalid CSS color code",
23+
"data": "#00332520",
24+
"valid": false
25+
},
26+
{
27+
"description": "an invalid CSS color name",
28+
"data": "puce",
29+
"valid": false
30+
},
31+
{
32+
"description": "a CSS color name containing invalid characters",
33+
"data": "light_grayish_red-violet",
34+
"valid": false
35+
}
36+
]
37+
}
38+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[
2+
{
3+
"description": "validation of date-time strings",
4+
"schema": {"format": "date-time"},
5+
"tests": [
6+
{
7+
"description": "a valid date-time string",
8+
"data": "1963-06-19T08:30:06.283185Z",
9+
"valid": true
10+
},
11+
{
12+
"description": "an invalid date-time string",
13+
"data": "06/19/1963 08:30:06 PST",
14+
"valid": false
15+
},
16+
{
17+
"description": "case-insensitive T and Z",
18+
"data": "1963-06-19t08:30:06.283185z",
19+
"valid": true
20+
},
21+
{
22+
"description": "only RFC3339 not all of ISO 8601 are valid",
23+
"data": "2013-350T01:01:01",
24+
"valid": false
25+
}
26+
]
27+
}
28+
]
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"description": "validation of date strings",
4+
"schema": {"format": "date"},
5+
"tests": [
6+
{
7+
"description": "a valid date string",
8+
"data": "1963-06-19",
9+
"valid": true
10+
},
11+
{
12+
"description": "an invalid date string",
13+
"data": "06/19/1963",
14+
"valid": false
15+
}
16+
]
17+
}
18+
]
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"description": "validation of e-mail addresses",
4+
"schema": {"format": "email"},
5+
"tests": [
6+
{
7+
"description": "a valid e-mail address",
8+
"data": "[email protected]",
9+
"valid": true
10+
},
11+
{
12+
"description": "an invalid e-mail address",
13+
"data": "2962",
14+
"valid": false
15+
}
16+
]
17+
}
18+
]

0 commit comments

Comments
 (0)