summaryrefslogtreecommitdiffstats
path: root/test/t/unit/test_unit_init_completion.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:19 +0000
commit6c09f2a45c5541e9c207d14fc7aa21a4a0066bde (patch)
tree0221189d367bf661f6f9493c4f17a03f0dd4b7d2 /test/t/unit/test_unit_init_completion.py
parentReleasing progress-linux version 1:2.11-8~progress7.99u1. (diff)
downloadbash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.tar.xz
bash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.zip
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/t/unit/test_unit_init_completion.py')
-rw-r--r--test/t/unit/test_unit_init_completion.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/test/t/unit/test_unit_init_completion.py b/test/t/unit/test_unit_init_completion.py
deleted file mode 100644
index 64a5a79..0000000
--- a/test/t/unit/test_unit_init_completion.py
+++ /dev/null
@@ -1,34 +0,0 @@
-import pytest
-
-from conftest import TestUnitBase, assert_bash_exec, assert_complete
-
-
-@pytest.mark.bashcomp(
- cmd=None,
- ignore_env=r"^[+-](COMP(_(WORDS|CWORD|LINE|POINT)|REPLY)|"
- r"cur|cword|words)=",
-)
-class TestUnitInitCompletion(TestUnitBase):
- def test_1(self, bash):
- """Test environment non-pollution, detected at teardown."""
- assert_bash_exec(
- bash,
- "foo() { "
- "local cur prev words cword "
- "COMP_WORDS=() COMP_CWORD=0 COMP_LINE= COMP_POINT=0; "
- "_init_completion; }; "
- "foo; unset foo",
- )
-
- def test_2(self, bash):
- output = self._test_unit(
- "_init_completion %s; echo $cur,${prev-}", bash, "(a)", 0, "a", 0
- )
- assert output == ","
-
- @pytest.mark.parametrize("redirect", "> >> 2> < &>".split())
- def test_redirect(self, bash, redirect):
- completion = assert_complete(
- bash, "%s " % redirect, cwd="shared/default"
- )
- assert all(x in completion for x in "foo bar".split())