Browse Source

Add a few more url parsing test cases

master
Natalie Pendragon 4 months ago
parent
commit
df9486f3ef
  1. 3
      tests/gus/lib/test_gemini.py

3
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"]),

Loading…
Cancel
Save