diff options
author | mjk <mjk@disroot.org> | 2022-11-05 01:03:08 +0300 |
---|---|---|
committer | mjk <mjk@disroot.org> | 2022-12-01 00:17:13 +0300 |
commit | ec0008b75282bf91b89ebbc0bdbe661796f38232 (patch) | |
tree | 93f467336339730aa55d5d494aa3b74c03e840db /test | |
parent | b84ef377fedac48fb660406b04f2b9908d86baac (diff) |
fix: Styling: Linkify URIs only if at the start of a word
Diffstat (limited to 'test')
-rw-r--r-- | test/no_gui/test_styling.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/test/no_gui/test_styling.py b/test/no_gui/test_styling.py index 8799b8e6e..5f3b8caf1 100644 --- a/test/no_gui/test_styling.py +++ b/test/no_gui/test_styling.py @@ -389,6 +389,14 @@ NONURIS = [ ' ', '.', ':', + '://', + 'Böblingen:🌥', + 'Bo\u0308blingen:🌥', # finds blingen:🌥 but rejects an unregistered scheme + 'path/to/file_na.me:123', + '_sche.me:body_', + '_sche+me:body_', + '.scheme:body', + '+scheme:body', # These are from https://mathiasbynens.be/demo/url-regex '//', @@ -396,10 +404,6 @@ NONURIS = [ '///a', '///', 'foo.com', - 'http://foo.bar?q=Spaces should be encoded', - 'http:// shouldfail.com', - ':// should fail', - 'http://foo.bar/foo(bar)baz quux', ] @@ -491,7 +495,6 @@ NONJIDS = [ # These are from https://rfc-editor.org/rfc/rfc7622#section-3.5 '"juliet"@example.com', - 'foo bar@example.com', # search is expected to find 'bar@example.com' '@example.com', 'henryⅣ@example.com', # localpart has a compatibility-decomposable cp '♚@example.com', # localpart has a symbol cp @@ -507,6 +510,9 @@ URIS_WITH_TEXT = [ ('<http://userid@example.com/>', ['http://userid@example.com/']), ('"http://userid@example.com/"', ['http://userid@example.com/']), ('regexes are useless (see https://en.wikipedia.org/wiki/Recursion_(computer_science)), but comfy', ['https://en.wikipedia.org/wiki/Recursion_(computer_science)']), + ('(scheme:body)', ['scheme:body']), + ('/scheme:body', ['scheme:body']), + ('!scheme:body', ['scheme:body']), ] |