diff tests/test_algpseudo.py @ 275:f365d9d2c0ad

FIX: explicit token types: backslash as separator now correctly handled
author Franz Glasner <fzglas.hg@dom66.de>
date Wed, 20 May 2026 10:16:58 +0200
parents 18553f595b34
children 397ed930a5ba
line wrap: on
line diff
--- a/tests/test_algpseudo.py	Wed May 20 09:51:29 2026 +0200
+++ b/tests/test_algpseudo.py	Wed May 20 10:16:58 2026 +0200
@@ -699,6 +699,16 @@
                 r"""\ttx-nd[a_Decorator](p1, p2)   \rem (Python) annotation""",
                 self.lexer))
 
+    def test_explicit_tokentype_all_seps(self):
+        for sep in r"/:|=*+!\$~":
+            self.assertTokenStreamEqualComplete(
+                [("Name.Decorator", "word"),
+                 ("Text.Whitespace", "\n"),
+                 ],
+                pygments.lex(
+                    r"\ttx-nd%sword%s" % (sep, sep,),
+                    self.lexer))
+
     def test_explicit_tokentype_error(self):
         self.assertTokenStreamEqualComplete(
             [("Generic.Error", r"""\ttx-non-existing[a_Decorator]"""),