From 0b13d4051637b83d9a306285562b3723dfa3b5a5 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Mon, 16 Jun 2025 21:46:27 +0200 Subject: [PATCH] Add text pattern test --- tests/test_text/test_text_patterns.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_text/test_text_patterns.py b/tests/test_text/test_text_patterns.py index e6a8b599..2670401e 100644 --- a/tests/test_text/test_text_patterns.py +++ b/tests/test_text/test_text_patterns.py @@ -157,6 +157,15 @@ def testTextPatterns_Markdown(): assert allMatches(regEx, "one ~two~~ three") == [] assert allMatches(regEx, "one~~two~~three") == [] + # Mark + regEx = REGEX_PATTERNS.markdownMark + assert allMatches(regEx, "one ==two== three") == [ + [("==two==", 4, 11), ("==", 4, 6), ("two", 6, 9), ("==", 9, 11)] + ] + assert allMatches(regEx, "one ==two= three") == [] + assert allMatches(regEx, "one =two== three") == [] + assert allMatches(regEx, "one==two==three") == [] + @pytest.mark.core def testTextPatterns_ShortcodesPlain():