(cmd2_app)
| 392 | |
| 393 | |
| 394 | def test_shell_command_complete(cmd2_app) -> None: |
| 395 | if sys.platform == "win32": |
| 396 | text = "c" |
| 397 | expected = "calc.exe" |
| 398 | else: |
| 399 | text = "l" |
| 400 | expected = "ls" |
| 401 | |
| 402 | line = f"shell {text}" |
| 403 | endidx = len(line) |
| 404 | begidx = endidx - len(text) |
| 405 | |
| 406 | completions = cmd2_app.complete(text, line, begidx, endidx) |
| 407 | assert expected in completions.to_strings() |
| 408 | |
| 409 | |
| 410 | def test_shell_command_completion_nomatch(cmd2_app) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…