Test that redirectors and terminators are word delimiters
(cmd2_app)
| 713 | |
| 714 | |
| 715 | def test_tokens_for_completion_punctuation(cmd2_app) -> None: |
| 716 | """Test that redirectors and terminators are word delimiters""" |
| 717 | text = "file" |
| 718 | line = f"command | < ;>>{text}" |
| 719 | endidx = len(line) |
| 720 | begidx = endidx - len(text) |
| 721 | |
| 722 | expected_tokens = ["command", "|", "<", ";", ">>", "file"] |
| 723 | expected_raw_tokens = ["command", "|", "<", ";", ">>", "file"] |
| 724 | |
| 725 | tokens, raw_tokens = cmd2_app.tokens_for_completion(line, begidx, endidx) |
| 726 | assert expected_tokens == tokens |
| 727 | assert expected_raw_tokens == raw_tokens |
| 728 | |
| 729 | |
| 730 | def test_tokens_for_completion_quoted_punctuation(cmd2_app) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…