summaryrefslogtreecommitdiff
path: root/json/tests/draft2020-12/optional/format/hostname.json
diff options
context:
space:
mode:
Diffstat (limited to 'json/tests/draft2020-12/optional/format/hostname.json')
-rw-r--r--json/tests/draft2020-12/optional/format/hostname.json98
1 files changed, 0 insertions, 98 deletions
diff --git a/json/tests/draft2020-12/optional/format/hostname.json b/json/tests/draft2020-12/optional/format/hostname.json
deleted file mode 100644
index 8a67fda..0000000
--- a/json/tests/draft2020-12/optional/format/hostname.json
+++ /dev/null
@@ -1,98 +0,0 @@
-[
- {
- "description": "validation of host names",
- "schema": { "format": "hostname" },
- "tests": [
- {
- "description": "all string formats ignore integers",
- "data": 12,
- "valid": true
- },
- {
- "description": "all string formats ignore floats",
- "data": 13.7,
- "valid": true
- },
- {
- "description": "all string formats ignore objects",
- "data": {},
- "valid": true
- },
- {
- "description": "all string formats ignore arrays",
- "data": [],
- "valid": true
- },
- {
- "description": "all string formats ignore booleans",
- "data": false,
- "valid": true
- },
- {
- "description": "all string formats ignore nulls",
- "data": null,
- "valid": true
- },
- {
- "description": "a valid host name",
- "data": "www.example.com",
- "valid": true
- },
- {
- "description": "a valid punycoded IDN hostname",
- "data": "xn--4gbwdl.xn--wgbh1c",
- "valid": true
- },
- {
- "description": "a host name starting with an illegal character",
- "data": "-a-host-name-that-starts-with--",
- "valid": false
- },
- {
- "description": "a host name containing illegal characters",
- "data": "not_a_valid_host_name",
- "valid": false
- },
- {
- "description": "a host name with a component too long",
- "data": "a-vvvvvvvvvvvvvvvveeeeeeeeeeeeeeeerrrrrrrrrrrrrrrryyyyyyyyyyyyyyyy-long-host-name-component",
- "valid": false
- },
- {
- "description": "starts with hyphen",
- "data": "-hostname",
- "valid": false
- },
- {
- "description": "ends with hyphen",
- "data": "hostname-",
- "valid": false
- },
- {
- "description": "starts with underscore",
- "data": "_hostname",
- "valid": false
- },
- {
- "description": "ends with underscore",
- "data": "hostname_",
- "valid": false
- },
- {
- "description": "contains underscore",
- "data": "host_name",
- "valid": false
- },
- {
- "description": "maximum label length",
- "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com",
- "valid": true
- },
- {
- "description": "exceeds maximum label length",
- "data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com",
- "valid": false
- }
- ]
- }
-]