Skip to content

Commit dec790c

Browse files
committed
Add new tests for symbol regex.
1 parent f988dbf commit dec790c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/widgets/test_colour_text.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,10 @@ def test_quote_undefined_or_no_quote_equals_none(self):
110110
'alot.commands.globals.settings._theme', DUMMY_THEME)
111111
def test_regex_symbol_is_correct(self):
112112
# Match 4th level quote
113-
self.assertEqual(parse_quotes('Aaa A'), AttrSpec('#580', '#586'))
114-
self.assertEqual(parse_quotes('Aa<>tb A'), AttrSpec('#580', '#586'))
113+
self.assertEqual(parse_quotes('Aaa A'), AttrSpec('#401', '#402'))
114+
115+
self.assertIsNone(parse_quotes('One symbol at the end <>!b'))
116+
self.assertEqual(parse_quotes('Aa<>tb Ah, so much fun'), AttrSpec('#401', '#402'))
117+
self.assertEqual(parse_quotes('> A symbol at the begining'), AttrSpec('#201', '#202'))
118+
self.assertEqual(parse_quotes('A A symbols every> where>>! >>'), AttrSpec('#201', '#202'))
119+
self.assertEqual(parse_quotes('A>A or A<A ?'), AttrSpec('#301', '#302'))

0 commit comments

Comments
 (0)