Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormjk <mjk@disroot.org>2022-10-31 18:16:46 +0300
committermjk <mjk@disroot.org>2022-11-05 19:16:40 +0300
commit31421f74ac5f071367ea8be593d586b93b8eb94e (patch)
tree91e2b264bd562810c0d0db3555b94da3ae45c18e /test
parentc5f6cc123276cb01b2be9cf6458a536be01b9b06 (diff)
imprv: Styling: Validate link syntax deeper and *after* parenthesis correction
Diffstat (limited to 'test')
-rw-r--r--test/no_gui/test_styling.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/no_gui/test_styling.py b/test/no_gui/test_styling.py
index e169d33ba..e80584a01 100644
--- a/test/no_gui/test_styling.py
+++ b/test/no_gui/test_styling.py
@@ -1,5 +1,9 @@
import unittest
+from gajim import gui
+gui.init('gtk')
+
+from gajim.common import app # Avoids circular imports from common.helpers
import gajim.common.styling as styling
from gajim.common.styling import PlainBlock
from gajim.common.styling import PreBlock
@@ -287,11 +291,11 @@ URIS = [
'a:b',
'a-:b',
'a.:b',
- 'xmpp:conference.gajim.org'
+ 'xmpp:conference.gajim.org',
'xmpp:asd@at',
'xmpp:asd@asd.at',
'xmpp:asd-asd@asd.asdasd.at.',
- 'xmpp:me@%5B::1%5D',
+ #'xmpp:me@%5B::1%5D', FIXME: unescape before validating domainpart
'xmpp:myself@127.13.42.69',
'xmpp:myself@127.13.42.69/localhost',
'xmpp:%23room%25irc.example@biboumi.xmpp.example',
@@ -498,9 +502,6 @@ class Test(unittest.TestCase):
def test_invalid_uris(self):
for foo in NONURIS + UNACCEPTABLE_URIS:
- if foo == 'scheme:' or\
- foo == 'http://':
- continue # these currently fial (FIXME)
text = self.wrap(foo)
hlinks = process_uris(text)
if len(hlinks) == 0:
@@ -518,8 +519,6 @@ class Test(unittest.TestCase):
def test_nonjids(self):
for foo in NONJIDS:
- if foo == 'juliet@':
- continue # this currently fials (FIXME)
text = self.wrap(foo)
hlinks = process_uris(text)
if len(hlinks) == 0: