We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6fbd9cc commit 91f0ddcCopy full SHA for 91f0ddc
tests/test_pt_utils.py
@@ -92,6 +92,18 @@ def test_pt_filter_style_never() -> None:
92
93
94
class TestCmd2Lexer:
95
+ @with_ansi_style(ru.AllowStyle.NEVER)
96
+ def test_lex_document_no_style(self, mock_cmd_app):
97
+ """Test lexing when styles are disallowed."""
98
+ lexer = pt_utils.Cmd2Lexer(cast(Any, mock_cmd_app))
99
+
100
+ line = "help something"
101
+ document = Document(line)
102
+ get_line = lexer.lex_document(document)
103
+ tokens = get_line(0)
104
105
+ assert tokens == [('', line)]
106
107
def test_lex_document_command(self, mock_cmd_app):
108
"""Test lexing a command name."""
109
mock_cmd_app.all_commands = ["help"]
0 commit comments