summaryrefslogtreecommitdiffstats
path: root/test/t/test_ssh_keygen.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
commitf4acb49ea148cdd899f7f29f1591c7bc853c2135 (patch)
treeb62d60873864065d6428a84a119dd8a3c90f1397 /test/t/test_ssh_keygen.py
parentAdding upstream version 1:2.11. (diff)
downloadbash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.tar.xz
bash-completion-f4acb49ea148cdd899f7f29f1591c7bc853c2135.zip
Adding upstream version 1:2.12.0.upstream/1%2.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/t/test_ssh_keygen.py')
-rw-r--r--test/t/test_ssh_keygen.py30
1 files changed, 28 insertions, 2 deletions
diff --git a/test/t/test_ssh_keygen.py b/test/t/test_ssh_keygen.py
index b773ab4..cc6ff4e 100644
--- a/test/t/test_ssh_keygen.py
+++ b/test/t/test_ssh_keygen.py
@@ -7,6 +7,18 @@ class TestSshKeygen:
def test_1(self, completion):
assert completion
+ @pytest.mark.complete(
+ "ssh-keygen -", require_cmd=True, shopt=dict(failglob=True)
+ )
+ def test_1_failglob(self, completion):
+ assert completion
+
+ @pytest.mark.complete(
+ "ssh-keygen -", require_cmd=True, shopt=dict(nullglob=True)
+ )
+ def test_1_nullglob(self, completion):
+ assert completion
+
@pytest.mark.complete("ssh-keygen -s foo_key ssh-copy-id/.ssh/")
def test_filedir_pub_at_end_of_s(self, completion):
assert completion
@@ -15,13 +27,11 @@ class TestSshKeygen:
@pytest.mark.complete("ssh-keygen -s foo_key -n foo,")
def test_usernames_for_n(self, completion):
assert completion
- assert not any("," in x for x in completion)
# TODO check that these are usernames
@pytest.mark.complete("ssh-keygen -s foo_key -h -n foo,")
def test_host_for_h_n(self, completion):
assert completion
- assert not any("," in x for x in completion)
# TODO check that these are hostnames
@pytest.mark.complete("ssh-keygen -Y foo -n ")
@@ -57,3 +67,19 @@ class TestSshKeygen:
@pytest.mark.complete("ssh-keygen -O unknown=")
def test_O_unknown(self, completion):
assert not completion
+
+ @pytest.mark.complete("ssh-keygen -O application=")
+ def test_O_application(self, completion):
+ assert completion == "ssh:"
+
+ @pytest.mark.complete("ssh-keygen -O application=s")
+ def test_O_application_s(self, completion):
+ assert completion == "sh:"
+
+ @pytest.mark.complete("ssh-keygen -O application=ssh:")
+ def test_O_application_ssh_colon(self, completion):
+ assert not completion
+
+ @pytest.mark.complete("ssh-keygen -O application=nonexistent")
+ def test_O_application_nonexistent(self, completion):
+ assert not completion