Module Name: src Committed By: rillig Date: Sat Aug 22 21:55:54 UTC 2020
Modified Files: src/distrib/sets/lists/tests: mi src/usr.bin/make/unit-tests: Makefile Added Files: src/usr.bin/make/unit-tests: dir-expand-path.exp dir-expand-path.mk Log Message: make(1): add test for expanding wildcards in directories This test covers DirExpandInt. To generate a diff of this commit: cvs rdiff -u -r1.900 -r1.901 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.113 -r1.114 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/dir-expand-path.exp \ src/usr.bin/make/unit-tests/dir-expand-path.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.900 src/distrib/sets/lists/tests/mi:1.901 --- src/distrib/sets/lists/tests/mi:1.900 Sat Aug 22 20:23:14 2020 +++ src/distrib/sets/lists/tests/mi Sat Aug 22 21:55:54 2020 @@ -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 Index: src/usr.bin/make/unit-tests/Makefile diff -u src/usr.bin/make/unit-tests/Makefile:1.113 src/usr.bin/make/unit-tests/Makefile:1.114 --- src/usr.bin/make/unit-tests/Makefile:1.113 Sat Aug 22 21:30:52 2020 +++ src/usr.bin/make/unit-tests/Makefile Sat Aug 22 21:55:54 2020 @@ -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 Added files: Index: src/usr.bin/make/unit-tests/dir-expand-path.exp diff -u /dev/null src/usr.bin/make/unit-tests/dir-expand-path.exp:1.1 --- /dev/null Sat Aug 22 21:55:54 2020 +++ src/usr.bin/make/unit-tests/dir-expand-path.exp Sat Aug 22 21:55:54 2020 @@ -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 Index: src/usr.bin/make/unit-tests/dir-expand-path.mk diff -u /dev/null src/usr.bin/make/unit-tests/dir-expand-path.mk:1.1 --- /dev/null Sat Aug 22 21:55:54 2020 +++ src/usr.bin/make/unit-tests/dir-expand-path.mk Sat Aug 22 21:55:54 2020 @@ -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.*