From cb550b7b7434b08bd0e74e460a2fe72a22116413 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 24 Oct 2024 12:17:06 -1000 Subject: [PATCH] Add more URL subtraction tests (#1385) --- tests/test_url.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_url.py b/tests/test_url.py index fafd372d7..e2bcac768 100644 --- a/tests/test_url.py +++ b/tests/test_url.py @@ -66,6 +66,18 @@ def test_str(): [ ("http://example.com/path/to", "http://example.com/", "path/to"), ("http://example.com/path/to", "http://example.com/spam", "path/to"), + ( + "http://example.com/////path/////to", + "http://example.com/////spam", + "path/to", + ), + ("http://example.com/this/is/a/test", "http://example.com/this/", "is/a/test"), + ( + "http://example.com/this/./is/a/test", + "http://example.com/this/", + "is/a/test", + ), + ("http://example.com/this/is/../a//test", "http://example.com/this/", "a/test"), ("http://example.com/path/to", "http://example.com/spam/", "../path/to"), ("http://example.com/path", "http://example.com/path/to/", ".."), ("http://example.com/", "http://example.com/", "."),