diff options
author | Matthäus G. Chajdas <dev@anteru.net> | 2020-09-22 20:40:58 +0200 |
---|---|---|
committer | Matthäus G. Chajdas <dev@anteru.net> | 2020-09-22 20:40:58 +0200 |
commit | f0d31da6b26e7057dc488d8ee04e06b1a448a49c (patch) | |
tree | bb01aa5da7a5f4aa4e3e2a4836b040c535ea977d /tests/test_analyze_lexer.py | |
parent | 07f596dbb9357c1ec2077bdc4319f594d287ae15 (diff) | |
download | pygments-git-task/add-analyze-text.tar.gz |
Improve various analyse_text methods.task/add-analyze-text
* Make Perl less confident in presence of :=.
* Improve brainfuck check to not parse the whole input.
* Improve Unicon by matching \self, /self
* Fix Ezhil not matching against the input text
Diffstat (limited to 'tests/test_analyze_lexer.py')
-rw-r--r-- | tests/test_analyze_lexer.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/test_analyze_lexer.py b/tests/test_analyze_lexer.py index 933ea15b..1d80bb01 100644 --- a/tests/test_analyze_lexer.py +++ b/tests/test_analyze_lexer.py @@ -45,4 +45,16 @@ def test_guess_lexer_hybris(): def test_guess_lexer_forth(): l = _guess_lexer_for_file('demo.frt') - assert l.__class__.__name__ == 'ForthLexer'
\ No newline at end of file + assert l.__class__.__name__ == 'ForthLexer' + +def test_guess_lexer_modula2(): + l = _guess_lexer_for_file('modula2_test_cases.def') + assert l.__class__.__name__ == 'Modula2Lexer' + +def test_guess_lexer_unicon(): + l = _guess_lexer_for_file('example.icn') + assert l.__class__.__name__ == 'UcodeLexer' + +def test_guess_lexer_ezhil(): + l = _guess_lexer_for_file('ezhil_primefactors.n') + assert l.__class__.__name__ == 'EzhilLexer'
\ No newline at end of file |