Skip to content

Commit c1adce1

Browse files
committed
test(java): test _comp_cmd_java__packages for IFS/failglob/splitting
1 parent 502fd11 commit c1adce1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/t/test_java.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,21 @@ def test_sourcepath_2(self, completion):
5858
"""pathname expansion should not happen after splitting the argument by
5959
`:`"""
6060
assert not completion
61+
62+
@pytest.mark.complete("javadoc -sourcepath java/a ")
63+
def test_packages_1(self, completion):
64+
assert completion == "c"
65+
66+
@pytest.mark.complete("javadoc -sourcepath java/a x")
67+
def test_packages_2(self, completion):
68+
assert not completion
69+
70+
@pytest.mark.complete(
71+
"javadoc -sourcepath java/a x", shopt=dict(failglob=True)
72+
)
73+
def test_packages_3(self, completion):
74+
assert not completion
75+
76+
@pytest.mark.complete("javadoc -sourcepath java/a ", env=dict(IFS="a"))
77+
def test_packages_4(self, completion):
78+
assert completion == "c"

0 commit comments

Comments
 (0)