diff options
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 |