This commit is contained in:
flywind 2020-09-24 14:54:13 +08:00 • committed by GitHub
commit e85c5ad379
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 2 deletions

17
tests/stdlib/turi.nim Normal file
View file

@ -0,0 +1,17 @@
discard """
cmd: "nim c -r --styleCheck:hint --panics:on $options $file"
targets: "c"
nimout: ""
action: "run"
exitcode: 0
timeout: 60.0
"""
import uri
block:
let org = "udp://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]:8080"
let url = parseUri(org)
doAssert url.hostname == "2001:0db8:85a3:0000:0000:8a2e:0370:7334" # true
let newUrl = parseUri($url)
doAssert newUrl.hostname == "2001:0db8:85a3:0000:0000:8a2e:0370:7334" # true