Fixes bugs introduced by ee62d56cad. Closes #2227.
This commit is contained in:
parent
4e1afdd3e2
commit
bab8190b67
2 changed files with 18 additions and 2 deletions
|
|
@ -285,6 +285,16 @@ proc `$`*(u: Uri): string =
|
|||
result.add(u.anchor)
|
||||
|
||||
when isMainModule:
|
||||
block:
|
||||
let str = "http://localhost"
|
||||
let test = parseUri(str)
|
||||
doAssert test.path == ""
|
||||
|
||||
block:
|
||||
let str = "http://localhost/"
|
||||
let test = parseUri(str)
|
||||
doAssert test.path == "/"
|
||||
|
||||
block:
|
||||
let str = "http://localhost:8080/test"
|
||||
let test = parseUri(str)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue