From e266c8a7505310ea4854d0bb66f858748624a43f Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 6 Nov 2019 22:35:56 +0300 Subject: [PATCH] urllib: test str() --- vlib/net/urllib/urllib_test.v | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/vlib/net/urllib/urllib_test.v b/vlib/net/urllib/urllib_test.v index e72a691671..3f822fa172 100644 --- a/vlib/net/urllib/urllib_test.v +++ b/vlib/net/urllib/urllib_test.v @@ -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)' +}