diff tests/test_algpseudo.py @ 97:dd4eb937485c

A couple of new keywords
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 03 May 2026 15:18:35 +0200
parents aed3204723ac
children aae16e3624e2
line wrap: on
line diff
--- a/tests/test_algpseudo.py	Sun May 03 15:15:34 2026 +0200
+++ b/tests/test_algpseudo.py	Sun May 03 15:18:35 2026 +0200
@@ -636,6 +636,29 @@
                 r"""\ttx-non-existing[a_Decorator]""",
                 self.lexer))
 
+    def test_end_combinations(self):
+        self.assertTokenStreamEqualComplete(
+            [("Keyword", "BEGIN"),
+             ("Text", "  "),
+             ("Keyword", "END"),
+             ("Text", "  "),
+             ("Keyword", "END OF FUNCTION"),
+             ("Text", "  "),
+             ("Keyword", "END OF FUNCTION"),
+             ("Text.Whitespace", " "),
+             ("Name.Entity", "An End of a Function"),
+             ("Text", "  "),
+             ("Keyword", "END OF FUNCTION"),
+             ("Text.Whitespace", " "),
+             ("Name.Entity", "The End of the Next Function"),
+             ("Text", " "),
+             ("Text.Whitespace", "\n"),
+             ],
+            pygments.lex(
+                r"""\begin  \end  \end-fn  \end-fn {An End of a Function}"""
+                r"""  \end fn {The End of the Next Function} """,
+                self.lexer))
+
 
 class PygmentizeCompletely(unittest.TestCase):