Skip to content

Commit ab3924a

Browse files
authored
Merge pull request #685 from swaeberle/check-single-label-hostnames
test single label hostnames
2 parents 299aa7f + 9265a4f commit ab3924a

File tree

6 files changed

+135
-0
lines changed

6 files changed

+135
-0
lines changed

tests/draft-next/optional/format/hostname.json

+25
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,31 @@
9595
"description": "exceeds maximum label length",
9696
"data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com",
9797
"valid": false
98+
},
99+
{
100+
"description": "single label",
101+
"data": "hostname",
102+
"valid": true
103+
},
104+
{
105+
"description": "single label with hyphen",
106+
"data": "host-name",
107+
"valid": true
108+
},
109+
{
110+
"description": "single label with digits",
111+
"data": "h0stn4me",
112+
"valid": true
113+
},
114+
{
115+
"description": "single label starting with digit",
116+
"data": "1host",
117+
"valid": true
118+
},
119+
{
120+
"description": "single label ending with digit",
121+
"data": "hostnam3",
122+
"valid": true
98123
}
99124
]
100125
}

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

+25
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,31 @@
9595
"description": "exceeds maximum label length",
9696
"data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com",
9797
"valid": false
98+
},
99+
{
100+
"description": "single label",
101+
"data": "hostname",
102+
"valid": true
103+
},
104+
{
105+
"description": "single label with hyphen",
106+
"data": "host-name",
107+
"valid": true
108+
},
109+
{
110+
"description": "single label with digits",
111+
"data": "h0stn4me",
112+
"valid": true
113+
},
114+
{
115+
"description": "single label starting with digit",
116+
"data": "1host",
117+
"valid": true
118+
},
119+
{
120+
"description": "single label ending with digit",
121+
"data": "hostnam3",
122+
"valid": true
98123
}
99124
]
100125
}

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

+25
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,31 @@
9595
"description": "exceeds maximum label length",
9696
"data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com",
9797
"valid": false
98+
},
99+
{
100+
"description": "single label",
101+
"data": "hostname",
102+
"valid": true
103+
},
104+
{
105+
"description": "single label with hyphen",
106+
"data": "host-name",
107+
"valid": true
108+
},
109+
{
110+
"description": "single label with digits",
111+
"data": "h0stn4me",
112+
"valid": true
113+
},
114+
{
115+
"description": "single label starting with digit",
116+
"data": "1host",
117+
"valid": true
118+
},
119+
{
120+
"description": "single label ending with digit",
121+
"data": "hostnam3",
122+
"valid": true
98123
}
99124
]
100125
}

tests/draft4/optional/format/hostname.json

+20
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,26 @@
9292
"description": "exceeds maximum label length",
9393
"data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com",
9494
"valid": false
95+
},
96+
{
97+
"description": "single label",
98+
"data": "hostname",
99+
"valid": true
100+
},
101+
{
102+
"description": "single label with hyphen",
103+
"data": "host-name",
104+
"valid": true
105+
},
106+
{
107+
"description": "single label with digits",
108+
"data": "h0stn4me",
109+
"valid": true
110+
},
111+
{
112+
"description": "single label ending with digit",
113+
"data": "hostnam3",
114+
"valid": true
95115
}
96116
]
97117
}

tests/draft6/optional/format/hostname.json

+20
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,26 @@
9292
"description": "exceeds maximum label length",
9393
"data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com",
9494
"valid": false
95+
},
96+
{
97+
"description": "single label",
98+
"data": "hostname",
99+
"valid": true
100+
},
101+
{
102+
"description": "single label with hyphen",
103+
"data": "host-name",
104+
"valid": true
105+
},
106+
{
107+
"description": "single label with digits",
108+
"data": "h0stn4me",
109+
"valid": true
110+
},
111+
{
112+
"description": "single label ending with digit",
113+
"data": "hostnam3",
114+
"valid": true
95115
}
96116
]
97117
}

tests/draft7/optional/format/hostname.json

+20
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,26 @@
9292
"description": "exceeds maximum label length",
9393
"data": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl.com",
9494
"valid": false
95+
},
96+
{
97+
"description": "single label",
98+
"data": "hostname",
99+
"valid": true
100+
},
101+
{
102+
"description": "single label with hyphen",
103+
"data": "host-name",
104+
"valid": true
105+
},
106+
{
107+
"description": "single label with digits",
108+
"data": "h0stn4me",
109+
"valid": true
110+
},
111+
{
112+
"description": "single label ending with digit",
113+
"data": "hostnam3",
114+
"valid": true
95115
}
96116
]
97117
}

0 commit comments

Comments
 (0)