urllib: test str()

pull/2672/head
Alexander Medvednikov 2019-11-06 22:35:56 +03:00
parent c4e9f09f0f
commit e266c8a750
1 changed files with 8 additions and 1 deletions

View File

@ -18,6 +18,13 @@ fn test_net_urllib() {
u.port() == '8080' &&
u.path == '/som/url' &&
u.fragment == 'testfragment' &&
u.user.username == 'joe' &&
u.user.username == 'joe' &&
u.user.password == 'pass'
}
fn test_str() {
url := urllib.parse("https://en.wikipedia.org/wiki/Brazil_(1985_film)") or {
panic("unable to parse URL")
}
assert url.str() == 'https://en.wikipedia.org/wiki/Brazil_(1985_film)'
}