Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
diff tests/test_algpseudo.py @ 117:d84f1fd10e64
Allow to customize the symbol for a remark
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 06 May 2026 13:35:12 +0200 |
| parents | 9bfd87544902 |
| children | 4d96ace53ba1 |
line wrap: on
line diff
--- a/tests/test_algpseudo.py Wed May 06 10:05:57 2026 +0200 +++ b/tests/test_algpseudo.py Wed May 06 13:35:12 2026 +0200 @@ -341,6 +341,17 @@ \\Rem the remark 2 """, self.lexer)) + def test_remark_custom(self): + # With the APL comment symbol + lexer = pygments.lexers.load_lexer_from_file( + ALGLEXERFILENAME, ALGLEXERCLASS, remark=u"⍝") + self.assertTokenStreamEqualComplete( + [("Comment.Single", "⍝"), # U+235D ⍝ APL FUNC. SYMBOL UP SHOE JOT + ("Comment.Single", " another remark"), + ("Text.Whitespace", "\n"), + ], + pygments.lex("\\REMARK another remark\n", lexer)) + def test_remark_in_text(self): self.assertTokenStreamEqualComplete( [("Text", "the text "),
