[PATCH 5/8] test_render_url: add some missing cases

0 views
Skip to first unread message

Rob Browning

unread,
Mar 27, 2026, 7:09:05 PM (12 days ago) Mar 27
to bup-...@googlegroups.com
Signed-off-by: Rob Browning <r...@defaultvalue.org>
Tested-by: Rob Browning <r...@defaultvalue.org>
---
test/int/test_url.py | 3 +++
1 file changed, 3 insertions(+)

diff --git a/test/int/test_url.py b/test/int/test_url.py
index b170f03b..b958eb63 100644
--- a/test/int/test_url.py
+++ b/test/int/test_url.py
@@ -51,6 +51,9 @@ def test_render_url():

with raises(ValueError, match='cannot represent relative path'):
rurl(urlx(host=b'h', path=b'p'))
+ assert rurl(urlx(path=b'//p')) == b'x:////p'
+ assert rurl(urlx(host=b'%')) == b'x://%25'
+ assert rurl(urlx(host=b':', user=b'/')) == b'x://%2f@%3a'
assert rdot(urlx(host=b'h', path=b'p')) == b'x://h/./p'

# FIXME: more negative tests
--
2.47.3

Reply all
Reply to author
Forward
0 new messages