diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
commit | f2621414ee5f2f601424c22f00e207903e3b6104 (patch) | |
tree | 56a856dafd1ca684bb23263cacaa723ee4f404fc /test/t/test_ssh_keygen.py | |
parent | Adding debian version 1:2.11-8. (diff) | |
download | bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.tar.xz bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.zip |
Merging upstream version 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.py | 30 |
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 |