diff --git a/test/fixtures/make/test2/Makefile b/test/fixtures/make/test2/Makefile index 71adba98420..835b51440e2 100644 --- a/test/fixtures/make/test2/Makefile +++ b/test/fixtures/make/test2/Makefile @@ -5,3 +5,19 @@ all: abc/xyz abc/xyz 123/xaa 123/xbb: mkdir -p $(@:/%=) date > $@ + +sub1test/bar/alpha sub1test/bar/beta: + mkdir -p $(@:/%=) + date > $@ + +sub2test/bar/alpha: + mkdir -p $(@:/%=) + date > $@ + +sub3test/bar/alpha sub3test/foo/alpha: + mkdir -p $(@:/%=) + date > $@ + +sub4test/bar/alpha sub4test/bar/beta sub4test2/foo/gamma: + mkdir -p $(@:/%=) + date > $@ diff --git a/test/t/test_make.py b/test/t/test_make.py index 09ddced03c0..0fc630b30bd 100644 --- a/test/t/test_make.py +++ b/test/t/test_make.py @@ -66,3 +66,19 @@ def test_github_issue_544_3(self, bash): def test_github_issue_544_4(self, bash): completion = assert_complete(bash, "make 123/xa") assert completion == "a" + + def test_subdir_1(self, bash): + completion = assert_complete(bash, "make sub1") + assert completion == "test/bar/" + + def test_subdir_2(self, bash): + completion = assert_complete(bash, "make sub2") + assert completion == "test/bar/alpha" + + def test_subdir_3(self, bash): + completion = assert_complete(bash, "make sub3") + assert completion == "test/" + + def test_subdir_4(self, bash): + completion = assert_complete(bash, "make sub4") + assert completion == "sub4test/bar/ sub4test2/foo/gamma".split()