Skip to content

Commit 21b776e

Browse files
committed
draft-06: format "uri-reference" tests
1 parent da8b14e commit 21b776e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

tests/draft6/optional/format.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
"data": "//foo.bar/?baz=qux#quux",
3535
"valid": false
3636
},
37+
{
38+
"description": "an invalid relative URI Reference",
39+
"data": "/abc",
40+
"valid": false
41+
},
3742
{
3843
"description": "an invalid URI",
3944
"data": "\\\\WINDOWS\\fileshare",
@@ -46,6 +51,37 @@
4651
}
4752
]
4853
},
54+
{
55+
"description": "validation of URI References",
56+
"schema": {"format": "uri-reference"},
57+
"tests": [
58+
{
59+
"description": "a valid URI",
60+
"data": "http://foo.bar/?baz=qux#quux",
61+
"valid": true
62+
},
63+
{
64+
"description": "a valid protocol-relative URI Reference",
65+
"data": "//foo.bar/?baz=qux#quux",
66+
"valid": true
67+
},
68+
{
69+
"description": "a valid relative URI Reference",
70+
"data": "/abc",
71+
"valid": true
72+
},
73+
{
74+
"description": "an invalid URI Reference",
75+
"data": "\\\\WINDOWS\\fileshare",
76+
"valid": false
77+
},
78+
{
79+
"description": "a valid URI Reference",
80+
"data": "abc",
81+
"valid": true
82+
}
83+
]
84+
},
4985
{
5086
"description": "validation of e-mail addresses",
5187
"schema": {"format": "email"},

0 commit comments

Comments
 (0)