Skip to content

Commit 6b417e6

Browse files
authored
validate-hostname: add tests for spaces (#8) and host ending with . (#18)
1 parent 108c998 commit 6b417e6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/validate-hostname.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ tests:
4646
- host: "xn--bcher-kva.ch"
4747
valid: true
4848

49+
# host ending with a .
50+
- host: "services."
51+
valid: true
52+
4953
# # this should only validate after being transformed into punycode as above
5054
# - host: "irc.Bücher.ch"
5155
# valid: false
@@ -70,3 +74,15 @@ tests:
7074
# empty hostname
7175
- host: ""
7276
valid: false
77+
78+
# spaces in host
79+
- host: " "
80+
valid: false
81+
- host: "example. net"
82+
valid: false
83+
- host: "ex ample.org"
84+
valid: false
85+
- host: " example.org"
86+
valid: false
87+
- host: "example.org "
88+
valid: false

0 commit comments

Comments
 (0)