Fixes bugs introduced by ee62d56cad. Closes #2227.

This commit is contained in:
Dominik Picheta 2015-03-05 21:18:28 +00:00
commit bab8190b67
2 changed files with 18 additions and 2 deletions

View file

@ -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)