make(1): add test for expanding wildcards in directories

This test covers DirExpandInt.
This commit is contained in:
rillig 2020-08-22 21:55:54 +00:00
parent a8b40c7d03
commit 526dac9499
4 changed files with 28 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.900 2020/08/22 20:23:14 rillig Exp $
# $NetBSD: mi,v 1.901 2020/08/22 21:55:54 rillig Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@ -4685,6 +4685,8 @@
./usr/tests/usr.bin/make/unit-tests/deptgt-suffixes.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/deptgt.exp tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/deptgt.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/dir-expand-path.exp tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/dir-expand-path.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/dir.exp tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/dir.mk tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/make/unit-tests/directive-elif.exp tests-usr.bin-tests compattestfile,atf

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.113 2020/08/22 21:30:52 sjg Exp $
# $NetBSD: Makefile,v 1.114 2020/08/22 21:55:54 rillig Exp $
#
# Unit tests for make(1)
#
@ -111,6 +111,7 @@ TESTS+= deptgt-silent
TESTS+= deptgt-stale
TESTS+= deptgt-suffixes
TESTS+= dir
TESTS+= dir-expand-path
TESTS+= directive
TESTS+= directive-elif
TESTS+= directive-elifdef

View File

@ -0,0 +1,4 @@
dir-expand-path.dir.1/file1.src
dir-expand-path.dir.1/file2.src
dir-expand-path.dir.2/file3.src
exit status 0

View File

@ -0,0 +1,19 @@
# $NetBSD: dir-expand-path.mk,v 1.1 2020/08/22 21:55:54 rillig Exp $
#
# Tests for filename expansion in the search path.
_!= rm -rf dir-expand-path.dir.*
_!= mkdir dir-expand-path.dir.1
_!= mkdir dir-expand-path.dir.2
_!= touch dir-expand-path.dir.1/file1.src
_!= touch dir-expand-path.dir.1/file2.src
_!= touch dir-expand-path.dir.2/file3.src
.PATH: dir-expand-path.dir.1
.PATH: dir-expand-path.dir.2
all: *.src
@printf '%s\n' ${.ALLSRC:O}
.END:
@rm -rf dir-expand-path.dir.*