Skip to content

Commit 827d19c

Browse files
committed
Copy uri tests to other drafts
1 parent b8611c4 commit 827d19c

File tree

5 files changed

+170
-0
lines changed

5 files changed

+170
-0
lines changed

tests/draft4/optional/format/uri.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,56 @@
132132
"description": "an invalid URI with comma in scheme",
133133
"data": "bar,baz:foo",
134134
"valid": false
135+
},
136+
{
137+
"description": "invalid userinfo",
138+
"data": "https://[@example.org/test.txt",
139+
"valid": false
140+
},
141+
{
142+
"description": "unescaped non US-ASCII characters",
143+
"data": "https://example.org/foobar®.txt",
144+
"valid": false
145+
},
146+
{
147+
"description": "invalid backslash character",
148+
"data": "https://example.org/foobar\\.txt",
149+
"valid": false
150+
},
151+
{
152+
"description": "invalid \" character",
153+
"data": "https://example.org/foobar\".txt",
154+
"valid": false
155+
},
156+
{
157+
"description": "invalid <> characters",
158+
"data": "https://example.org/foobar<>.txt",
159+
"valid": false
160+
},
161+
{
162+
"description": "invalid {} characters",
163+
"data": "https://example.org/foobar{}.txt",
164+
"valid": false
165+
},
166+
{
167+
"description": "invalid ^ character",
168+
"data": "https://example.org/foobar^.txt",
169+
"valid": false
170+
},
171+
{
172+
"description": "invalid ` character",
173+
"data": "https://example.org/foobar`.txt",
174+
"valid": false
175+
},
176+
{
177+
"description": "invalid SPACE character",
178+
"data": "https://example.org/foo bar.txt",
179+
"valid": false
180+
},
181+
{
182+
"description": "invalid | character",
183+
"data": "https://example.org/foobar|.txt",
184+
"valid": false
135185
}
136186
]
137187
}

tests/draft6/optional/format/uri-reference.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@
6767
"description": "an invalid URI fragment",
6868
"data": "#frag\\ment",
6969
"valid": false
70+
},
71+
{
72+
"description": "unescaped non US-ASCII characters",
73+
"data": "/foobar®.txt",
74+
"valid": false
75+
},
76+
{
77+
"description": "invalid backslash character",
78+
"data": "https://example.org/foobar\\.txt",
79+
"valid": false
7080
}
7181
]
7282
}

tests/draft6/optional/format/uri.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,56 @@
132132
"description": "an invalid URI with comma in scheme",
133133
"data": "bar,baz:foo",
134134
"valid": false
135+
},
136+
{
137+
"description": "invalid userinfo",
138+
"data": "https://[@example.org/test.txt",
139+
"valid": false
140+
},
141+
{
142+
"description": "unescaped non US-ASCII characters",
143+
"data": "https://example.org/foobar®.txt",
144+
"valid": false
145+
},
146+
{
147+
"description": "invalid backslash character",
148+
"data": "https://example.org/foobar\\.txt",
149+
"valid": false
150+
},
151+
{
152+
"description": "invalid \" character",
153+
"data": "https://example.org/foobar\".txt",
154+
"valid": false
155+
},
156+
{
157+
"description": "invalid <> characters",
158+
"data": "https://example.org/foobar<>.txt",
159+
"valid": false
160+
},
161+
{
162+
"description": "invalid {} characters",
163+
"data": "https://example.org/foobar{}.txt",
164+
"valid": false
165+
},
166+
{
167+
"description": "invalid ^ character",
168+
"data": "https://example.org/foobar^.txt",
169+
"valid": false
170+
},
171+
{
172+
"description": "invalid ` character",
173+
"data": "https://example.org/foobar`.txt",
174+
"valid": false
175+
},
176+
{
177+
"description": "invalid SPACE character",
178+
"data": "https://example.org/foo bar.txt",
179+
"valid": false
180+
},
181+
{
182+
"description": "invalid | character",
183+
"data": "https://example.org/foobar|.txt",
184+
"valid": false
135185
}
136186
]
137187
}

tests/draft7/optional/format/uri-reference.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@
6767
"description": "an invalid URI fragment",
6868
"data": "#frag\\ment",
6969
"valid": false
70+
},
71+
{
72+
"description": "unescaped non US-ASCII characters",
73+
"data": "/foobar®.txt",
74+
"valid": false
75+
},
76+
{
77+
"description": "invalid backslash character",
78+
"data": "https://example.org/foobar\\.txt",
79+
"valid": false
7080
}
7181
]
7282
}

tests/draft7/optional/format/uri.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,56 @@
132132
"description": "an invalid URI with comma in scheme",
133133
"data": "bar,baz:foo",
134134
"valid": false
135+
},
136+
{
137+
"description": "invalid userinfo",
138+
"data": "https://[@example.org/test.txt",
139+
"valid": false
140+
},
141+
{
142+
"description": "unescaped non US-ASCII characters",
143+
"data": "https://example.org/foobar®.txt",
144+
"valid": false
145+
},
146+
{
147+
"description": "invalid backslash character",
148+
"data": "https://example.org/foobar\\.txt",
149+
"valid": false
150+
},
151+
{
152+
"description": "invalid \" character",
153+
"data": "https://example.org/foobar\".txt",
154+
"valid": false
155+
},
156+
{
157+
"description": "invalid <> characters",
158+
"data": "https://example.org/foobar<>.txt",
159+
"valid": false
160+
},
161+
{
162+
"description": "invalid {} characters",
163+
"data": "https://example.org/foobar{}.txt",
164+
"valid": false
165+
},
166+
{
167+
"description": "invalid ^ character",
168+
"data": "https://example.org/foobar^.txt",
169+
"valid": false
170+
},
171+
{
172+
"description": "invalid ` character",
173+
"data": "https://example.org/foobar`.txt",
174+
"valid": false
175+
},
176+
{
177+
"description": "invalid SPACE character",
178+
"data": "https://example.org/foo bar.txt",
179+
"valid": false
180+
},
181+
{
182+
"description": "invalid | character",
183+
"data": "https://example.org/foobar|.txt",
184+
"valid": false
135185
}
136186
]
137187
}

0 commit comments

Comments
 (0)