summaryrefslogtreecommitdiffstats
path: root/test/t/unit
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-17 14:57:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-17 14:57:16 +0000
commit839f2a19145079d32e1d0ab5a0f31f9cd7c3afdf (patch)
treee8091b85221c46641c1a902e9e19ca72fd0d002f /test/t/unit
parentAdding upstream version 1:2.13.0. (diff)
downloadbash-completion-upstream.tar.xz
bash-completion-upstream.zip
Adding upstream version 1:2.14.0.upstream/1%2.14.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/t/unit')
-rw-r--r--test/t/unit/test_unit_compgen_available_interfaces.py2
-rw-r--r--test/t/unit/test_unit_load.py3
-rw-r--r--test/t/unit/test_unit_realcommand.py8
3 files changed, 12 insertions, 1 deletions
diff --git a/test/t/unit/test_unit_compgen_available_interfaces.py b/test/t/unit/test_unit_compgen_available_interfaces.py
index 5e93100..f3ebac0 100644
--- a/test/t/unit/test_unit_compgen_available_interfaces.py
+++ b/test/t/unit/test_unit_compgen_available_interfaces.py
@@ -22,4 +22,4 @@ class TestUtilCompgenAvailableInterfaces:
"_comp__test_compgen available_interfaces",
want_output=True,
)
- assert ":" not in output.strip()
+ assert ":>" not in output.strip()
diff --git a/test/t/unit/test_unit_load.py b/test/t/unit/test_unit_load.py
index 3515703..5513041 100644
--- a/test/t/unit/test_unit_load.py
+++ b/test/t/unit/test_unit_load.py
@@ -128,3 +128,6 @@ class TestCompLoad:
# The in-tree `sh` completion should be loaded here,
# and cause no output, unlike our `$PWD/prefix1/bin/sh` canary.
assert_bash_exec(bash, "_comp_load sh", want_output=False)
+
+ def test_option_like_cmd_name(self, bash):
+ assert_bash_exec(bash, "! _comp_load -- --non-existent")
diff --git a/test/t/unit/test_unit_realcommand.py b/test/t/unit/test_unit_realcommand.py
index 4eb7b73..a057788 100644
--- a/test/t/unit/test_unit_realcommand.py
+++ b/test/t/unit/test_unit_realcommand.py
@@ -88,3 +88,11 @@ class TestUnitRealCommand:
want_output=False,
)
assert output.strip() == ""
+
+ def test_option_like_cmd_name(self, bash, functions):
+ output = assert_bash_exec(
+ bash,
+ "! __tester --non-existent",
+ want_output=False,
+ )
+ assert output.strip() == ""