summaryrefslogtreecommitdiff
path: root/test/t/test_perl.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/t/test_perl.py')
-rw-r--r--test/t/test_perl.py34
1 files changed, 23 insertions, 11 deletions
diff --git a/test/t/test_perl.py b/test/t/test_perl.py
index 7c0c6094..c8baa2f3 100644
--- a/test/t/test_perl.py
+++ b/test/t/test_perl.py
@@ -11,33 +11,33 @@ class TestPerl:
def test_2(self, completion):
assert not completion
- @pytest.mark.complete("perl -V:install")
+ @pytest.mark.complete("perl -V:install", require_cmd=True)
def test_3(self, completion):
assert completion
- @pytest.mark.complete("perl -V::install")
+ @pytest.mark.complete("perl -V::install", require_cmd=True)
def test_4(self, completion):
assert completion
# Assume File::Spec and friends are always installed
- @pytest.mark.complete("perl -MFile")
+ @pytest.mark.complete("perl -MFile", require_cmd=True)
def test_5(self, completion):
assert completion
- @pytest.mark.complete("perl -MFile::Sp")
+ @pytest.mark.complete("perl -MFile::Sp", require_cmd=True)
def test_6(self, completion):
assert completion
- @pytest.mark.complete("perl -MFile::Spec::Func")
+ @pytest.mark.complete("perl -MFile::Spec::Func", require_cmd=True)
def test_7(self, completion):
assert completion
- @pytest.mark.complete("perl -M-File")
+ @pytest.mark.complete("perl -M-File", require_cmd=True)
def test_8(self, completion):
assert completion
- @pytest.mark.complete("perl -m-File::")
+ @pytest.mark.complete("perl -m-File::", require_cmd=True)
def test_9(self, completion):
assert completion
@@ -67,13 +67,25 @@ class TestPerl:
@pytest.mark.complete("perl -x shared/default/b")
def test_15(self, completion):
- """-x with space should complete dirs."""
- assert completion == ["shared/default/bar bar.d/"]
+ """-x with space should complete files+dirs."""
+ assert completion == ["bar", "bar bar.d/"]
- @pytest.mark.complete("perl -d:", env=dict(PERL5LIB="$PWD/perl"))
+ @pytest.mark.complete(
+ "perl -d:", env=dict(PERL5LIB="$PWD/perl"), require_cmd=True
+ )
def test_16(self, completion):
assert "BashCompletion" in completion
- @pytest.mark.complete("perl -dt:", env=dict(PERL5LIB="$PWD/perl"))
+ @pytest.mark.complete(
+ "perl -dt:", env=dict(PERL5LIB="$PWD/perl"), require_cmd=True
+ )
def test_17(self, completion):
assert "BashCompletion" in completion
+
+ @pytest.mark.complete("perl -E ")
+ def test_dash_capital_e(self, completion):
+ assert not completion
+
+ @pytest.mark.complete("perl -e")
+ def test_dash_e(self, completion):
+ assert not completion