Skip to content

Commit bf65ef2

Browse files
Paul Schwabauerkoplas
authored andcommitted
Copy uri tests to other drafts
1 parent b8611c4 commit bf65ef2

File tree

9 files changed

+290
-0
lines changed

9 files changed

+290
-0
lines changed

tests/draft2019-09/optional/format/uri-reference.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@
7070
"description": "an invalid URI fragment",
7171
"data": "#frag\\ment",
7272
"valid": false
73+
},
74+
{
75+
"description": "unescaped non US-ASCII characters",
76+
"data": "/foobar®.txt",
77+
"valid": false
78+
},
79+
{
80+
"description": "invalid backslash character",
81+
"data": "https://example.org/foobar\\.txt",
82+
"valid": false
7383
}
7484
]
7585
}

tests/draft2019-09/optional/format/uri.json

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

tests/draft2020-12/optional/format/uri-reference.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@
7070
"description": "an invalid URI fragment",
7171
"data": "#frag\\ment",
7272
"valid": false
73+
},
74+
{
75+
"description": "unescaped non US-ASCII characters",
76+
"data": "/foobar®.txt",
77+
"valid": false
78+
},
79+
{
80+
"description": "invalid backslash character",
81+
"data": "https://example.org/foobar\\.txt",
82+
"valid": false
7383
}
7484
]
7585
}

tests/draft2020-12/optional/format/uri.json

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

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)