diff options
author | mjk <mjk@disroot.org> | 2022-11-01 00:39:09 +0300 |
---|---|---|
committer | mjk <mjk@disroot.org> | 2022-11-06 00:18:52 +0300 |
commit | f0feaba1ff281a92ff7704b8a1ae143f5300e481 (patch) | |
tree | 21ae62a0aa2bdd673775eacce42acf69f351c397 /test | |
parent | 0fda2adf4e0de753fb2a333e7402f8a531c7d0b3 (diff) |
fix: URI parsing: More robustness with geo URIs
* Don't treat altitude as part of longitude
* Detect more invalid URIs
Diffstat (limited to 'test')
-rw-r--r-- | test/no_gui/test_styling.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/no_gui/test_styling.py b/test/no_gui/test_styling.py index af6ed9f83..6579bfb8f 100644 --- a/test/no_gui/test_styling.py +++ b/test/no_gui/test_styling.py @@ -301,6 +301,8 @@ URIS = [ 'xmpp:%23room%25irc.example@biboumi.xmpp.example', 'xmpp:+15551234567@cheogram.com', 'xmpp:romeo@montague.net?message;subject=Test%20Message;body=Here%27s%20a%20test%20message', + 'geo:1,2', + 'geo:1,2,3', # These seem to be from https://mathiasbynens.be/demo/url-regex 'http://foo.com/blah_blah', @@ -405,6 +407,16 @@ UNACCEPTABLE_URIS = [ 'http://##', 'http://##/', 'http:///a', + + 'geo:1,', + 'geo:,2', + #'geo:1,2,', FIXME: wrongly parsed as valid + 'geo:1,,3', + 'geo:,2,3', + 'geo:1,,', + 'geo:,2,', + 'geo:,,3', + 'geo:,,', ] |