summaryrefslogtreecommitdiff
path: root/test/t/test_lftp.py
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gabriel@inconstante.net.br>2020-08-03 18:43:13 -0300
committerGabriel F. T. Gomes <gabriel@inconstante.net.br>2020-08-03 18:43:13 -0300
commit95623d39d6029ba78ec96ad5ea08e9ac12629b91 (patch)
treeea0fe36eb5e6f40e0a1f765d44c4b0c0b2bfb089 /test/t/test_lftp.py
parent019f3cc463db63abc6460f97deb488deec43840b (diff)
downloadbash-completion-95623d39d6029ba78ec96ad5ea08e9ac12629b91.tar.gz
New upstream version 2.11upstream/2.11upstream
Diffstat (limited to 'test/t/test_lftp.py')
-rw-r--r--test/t/test_lftp.py14
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):