geminispace.info

gemini search engine
git clone https://git.clttr.info/geminispace.info.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit df9486f3ef44214ad933629f87529d83ff424f65
parent 788291199d1fc5f29aa12bad051153c4d6b71e66
Author: Natalie Pendragon <natpen@natpen.net>
Date:   Sun,  7 Feb 2021 08:23:34 -0800

Add a few more url parsing test cases

Diffstat:
Mtests/gus/lib/test_gemini.py | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/tests/gus/lib/test_gemini.py b/tests/gus/lib/test_gemini.py @@ -46,7 +46,10 @@ text @pytest.mark.parametrize("test_input,expected_result", [ (["gemini://gus.guru", None, None], [True, "gemini://gus.guru", "gus.guru"]), (["/bar", "gemini://gus.guru/foo", None], [False, None, None]), + (["/bar", "gemini://gus.guru/foo/", None], [False, None, None]), (["/bar", "gemini://gus.guru/foo", "gus.guru"], [True, "gemini://gus.guru/bar", "gus.guru"]), + (["/bar", "gemini://gus.guru/foo/", "gus.guru"], [True, "gemini://gus.guru/bar", "gus.guru"]), + (["bar", "gemini://gus.guru/foo", "gus.guru"], [True, "gemini://gus.guru/bar", "gus.guru"]), (["bar", "gemini://gus.guru/foo/", "gus.guru"], [True, "gemini://gus.guru/foo/bar", "gus.guru"]), # (["bar", "gemini://gus.guru/foo", "gus.guru"], [True, "gemini://gus.guru/foo/bar", "gus.guru"]), (["//foo.com", None, None], [True, "gemini://foo.com", "foo.com"]),