mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 10:08:40 +00:00
Improving Syntax.guess_lexer test
This commit is contained in:
parent
15e72ab433
commit
49e9fe9bd2
1 changed files with 1 additions and 0 deletions
|
@ -267,6 +267,7 @@ def test_from_file_unknown_lexer():
|
|||
|
||||
|
||||
def test_syntax_guess_lexer():
|
||||
assert Syntax.guess_lexer("banana.py") == "python"
|
||||
assert Syntax.guess_lexer("banana.py", "import this") == "python"
|
||||
assert Syntax.guess_lexer("banana.html", "<a href='#'>hello</a>") == "html"
|
||||
assert Syntax.guess_lexer("banana.html", "<%= @foo %>") == "rhtml"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue