diff options
Diffstat (limited to 'test/t/test_lftp.py')
-rw-r--r-- | test/t/test_lftp.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/test/t/test_lftp.py b/test/t/test_lftp.py index 765e51e1..f775a4c6 100644 --- a/test/t/test_lftp.py +++ b/test/t/test_lftp.py @@ -1,17 +1,15 @@ import pytest -from conftest import assert_bash_exec - @pytest.mark.bashcomp(pre_cmds=("HOME=$PWD/lftp",)) class TestLftp: - @pytest.mark.complete("lftp ") - def test_1(self, bash, completion): - hosts = assert_bash_exec( - bash, "compgen -A hostname", want_output=True - ).split() + @pytest.mark.complete("lftp ", require_cmd=True) + def test_1(self, bash, completion, output_sort_uniq): + hosts = output_sort_uniq("compgen -A hostname") assert all(x in completion for x in hosts) - assert "lftptest" in completion # defined in lftp/.lftp/bookmarks + # defined in lftp/.lftp/bookmarks + assert all(x in completion for x in "lftptest spacetest".split()) + assert "badbookmark" not in completion @pytest.mark.complete("lftp -", require_cmd=True) def test_2(self, completion): |