Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make/unit-tests make(1): add test for expanding wild...



details:   https://anonhg.NetBSD.org/src/rev/dd41744be4e1
branches:  trunk
changeset: 1013212:dd41744be4e1
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Aug 22 21:55:54 2020 +0000

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

This test covers DirExpandInt.

diffstat:

 distrib/sets/lists/tests/mi                 |   4 +++-
 usr.bin/make/unit-tests/Makefile            |   3 ++-
 usr.bin/make/unit-tests/dir-expand-path.exp |   4 ++++
 usr.bin/make/unit-tests/dir-expand-path.mk  |  19 +++++++++++++++++++
 4 files changed, 28 insertions(+), 2 deletions(-)

diffs (66 lines):

diff -r a3b14bad9f96 -r dd41744be4e1 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Sat Aug 22 21:42:38 2020 +0000
+++ b/distrib/sets/lists/tests/mi       Sat Aug 22 21:55:54 2020 +0000
@@ -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
diff -r a3b14bad9f96 -r dd41744be4e1 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Sat Aug 22 21:42:38 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Sat Aug 22 21:55:54 2020 +0000
@@ -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-stale
 TESTS+=                deptgt-suffixes
 TESTS+=                dir
+TESTS+=                dir-expand-path
 TESTS+=                directive
 TESTS+=                directive-elif
 TESTS+=                directive-elifdef
diff -r a3b14bad9f96 -r dd41744be4e1 usr.bin/make/unit-tests/dir-expand-path.exp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/dir-expand-path.exp       Sat Aug 22 21:55:54 2020 +0000
@@ -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
diff -r a3b14bad9f96 -r dd41744be4e1 usr.bin/make/unit-tests/dir-expand-path.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/dir-expand-path.mk        Sat Aug 22 21:55:54 2020 +0000
@@ -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.*



Home | Main Index | Thread Index | Old Index