From 37189ae65aaf1ef3db0954af18d75737b1326de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BA=D0=BE=D0=B2=D0=BE=D1=80=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=90=D0=BD=D0=B4=D1=80?= =?UTF-8?q?=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Mon, 20 Jul 2020 20:21:16 +0300 Subject: [PATCH] Test that uri format scheme is validated for allowed chars This is simple to implement. scheme = ALPHA *( ALPHA / DIGIT / + / - / . ) --- tests/draft2019-09/optional/format/uri.json | 5 +++++ tests/draft4/optional/format/uri.json | 5 +++++ tests/draft6/optional/format/uri.json | 5 +++++ tests/draft7/optional/format/uri.json | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/tests/draft2019-09/optional/format/uri.json b/tests/draft2019-09/optional/format/uri.json index 25cc40c8..4306a686 100644 --- a/tests/draft2019-09/optional/format/uri.json +++ b/tests/draft2019-09/optional/format/uri.json @@ -97,6 +97,11 @@ "description": "an invalid URI with spaces and missing scheme", "data": ":// should fail", "valid": false + }, + { + "description": "an invalid URI with comma in scheme", + "data": "bar,baz:foo", + "valid": false } ] } diff --git a/tests/draft4/optional/format/uri.json b/tests/draft4/optional/format/uri.json index 25cc40c8..4306a686 100644 --- a/tests/draft4/optional/format/uri.json +++ b/tests/draft4/optional/format/uri.json @@ -97,6 +97,11 @@ "description": "an invalid URI with spaces and missing scheme", "data": ":// should fail", "valid": false + }, + { + "description": "an invalid URI with comma in scheme", + "data": "bar,baz:foo", + "valid": false } ] } diff --git a/tests/draft6/optional/format/uri.json b/tests/draft6/optional/format/uri.json index 25cc40c8..4306a686 100644 --- a/tests/draft6/optional/format/uri.json +++ b/tests/draft6/optional/format/uri.json @@ -97,6 +97,11 @@ "description": "an invalid URI with spaces and missing scheme", "data": ":// should fail", "valid": false + }, + { + "description": "an invalid URI with comma in scheme", + "data": "bar,baz:foo", + "valid": false } ] } diff --git a/tests/draft7/optional/format/uri.json b/tests/draft7/optional/format/uri.json index 25cc40c8..4306a686 100644 --- a/tests/draft7/optional/format/uri.json +++ b/tests/draft7/optional/format/uri.json @@ -97,6 +97,11 @@ "description": "an invalid URI with spaces and missing scheme", "data": ":// should fail", "valid": false + }, + { + "description": "an invalid URI with comma in scheme", + "data": "bar,baz:foo", + "valid": false } ] }