Skip to content

Commit e060e44

Browse files
committed
test(lexer): Use generic test name for underscore metavar regression
1 parent f8b13b5 commit e060e44

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tests/docs/_ext/test_argparse_lexer.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -810,16 +810,16 @@ def test_argparse_help_lexer_multiline() -> None:
810810
)
811811

812812

813-
def test_tmuxp_load_usage_underscores() -> None:
814-
"""Test tmuxp load usage with underscore metavars.
813+
def test_lowercase_metavar_with_underscores() -> None:
814+
"""Test lowercase metavars with underscores are fully captured.
815815
816-
Regression test for underscore handling in lowercase metavars.
817-
Previously, `socket_name` was tokenized as `socket` + `_name` (split).
816+
Regression test: previously `socket_name` was tokenized as `socket` + `_name`.
817+
Example from tmuxp load usage.
818818
"""
819-
usage = "usage: tmuxp load [-L socket_name] [-S socket_path] [-f tmux_config_file]"
819+
usage = "usage: prog [-L socket_name] [-S socket_path] [-f config_file]"
820820
tokens = get_usage_tokens(usage)
821821

822822
# All underscore metavars should be fully captured
823823
assert ("Token.Name.Variable", "socket_name") in tokens
824824
assert ("Token.Name.Variable", "socket_path") in tokens
825-
assert ("Token.Name.Variable", "tmux_config_file") in tokens
825+
assert ("Token.Name.Variable", "config_file") in tokens

0 commit comments

Comments
 (0)