Skip to content

Commit

Permalink
validate-hostname: add tests for spaces (#8) and host ending with . (#18
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jlu5 committed May 29, 2023
1 parent 108c998 commit 6b417e6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/validate-hostname.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ tests:
- host: "xn--bcher-kva.ch"
valid: true

# host ending with a .
- host: "services."
valid: true

# # this should only validate after being transformed into punycode as above
# - host: "irc.Bücher.ch"
# valid: false
Expand All @@ -70,3 +74,15 @@ tests:
# empty hostname
- host: ""
valid: false

# spaces in host
- host: " "
valid: false
- host: "example. net"
valid: false
- host: "ex ample.org"
valid: false
- host: " example.org"
valid: false
- host: "example.org "
valid: false

0 comments on commit 6b417e6

Please sign in to comment.