From f2621414ee5f2f601424c22f00e207903e3b6104 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:03:18 +0200 Subject: Merging upstream version 1:2.12.0. Signed-off-by: Daniel Baumann --- test/t/test_ssh_keygen.py | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'test/t/test_ssh_keygen.py') 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 -- cgit v1.2.3