From 2dfe1ee05db985a4bd4b9448108453818757f541 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Fri, 18 Mar 2022 17:28:27 +0100 Subject: [PATCH] Added Reverse tests --- tests/modules/test_syntax.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/modules/test_syntax.py b/tests/modules/test_syntax.py index 11fd69f..2f948da 100644 --- a/tests/modules/test_syntax.py +++ b/tests/modules/test_syntax.py @@ -88,6 +88,8 @@ dict_advanced_syntax_input_and_expected_output = { [sy.HyperlinkToken(["[text_link]('text://www.website.com/link.html')"])]) ], + + # il_link | et_strong | et_em | et_strikethrough | et_underline | et_custom_span # Enhanced Text "enhanced_text": [ # Matches a line of text, with or without inline elements @@ -115,6 +117,10 @@ dict_advanced_syntax_input_and_expected_output = { sy.HyperlinkToken(['[link_name]("link")']), sy.TextToken(["and a"]), sy.EtEmToken(["*"]), sy.TextToken(["bold"]), sy.EtEmToken(["*"]), )), + ("Reverse order (#123) Span __ Underline ~~ Strikethrough", (sy.EtCustomSpanToken(["123"]), sy.TextToken(["Reverse order"]), + sy.EtCustomSpanToken(["123"]), sy.TextToken(["Span"]), + sy.EtUnderlineToken(["__"]), sy.TextToken(["Underline"]), + sy.EtStrikethroughToken(["~~"]), sy.TextToken(["Strikethrough"]), )), # noqa E501 (line too long) ], @@ -217,12 +223,14 @@ list_of_text_input_and_readable_output = [ ("## Text2 ##", "one_header", "
"), # Text + # il_link | et_strong | et_em | et_strikethrough | et_underline | et_custom_span ("*Italic*", "et_em", ""), ("__Underline__", "et_underline", ""), ("**Bold**", "et_strong", ""), ("~~Strikethrough~~", "et_strikethrough", ""), ("Text *bold __underline__ still bold*", "enhanced_text", "Text bold underline still bold "), # noqa E501 (line too long) ("[link]('http://www.google.com')", "il_link", ""), + ("Reverse order: (#123) Span, __underline__ ~~strikethrough~~ **emphasis * Strong**", "enhanced_text", "Reverse order: ( Span, ~~strikethrough~~ emphasis Strong "), # noqa E501 (line too long) # Structural elements ("<"),