File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
import pytest
2
2
3
+ from conftest import assert_bash_exec
4
+
3
5
4
6
@pytest .mark .bashcomp (ignore_env = r"^\+ANT_ARGS=" )
5
7
class TestAnt :
@@ -18,8 +20,15 @@ def test_3(self, completion):
18
20
@pytest .mark .complete (
19
21
"ant " , cwd = "ant" , env = dict (ANT_ARGS = "'-f named-build.xml'" )
20
22
)
21
- def test_4 (self , completion ):
22
- assert completion == "named-build"
23
+ def test_4 (self , bash , completion ):
24
+ output = assert_bash_exec (bash , "complete -p ant" , want_output = True )
25
+ if "complete-ant-cmd.pl" in output :
26
+ # Some versions of complete-ant-cmd.pl don't treat ANT_ARGS right;
27
+ # in those cases we get the correct completion produced by _ant
28
+ # plus whatever complete-ant-cmd.pl was able to get from build.xml
29
+ assert "named-build" in completion
30
+ else :
31
+ assert completion == "named-build"
23
32
24
33
@pytest .mark .complete ("ant -l " )
25
34
def test_5 (self , completion ):
You can’t perform that action at this time.
0 commit comments