summaryrefslogtreecommitdiffstats
path: root/tools/regression
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-04-20 20:57:00 +0000
committerjmallett <jmallett@FreeBSD.org>2002-04-20 20:57:00 +0000
commit723f201ed84ad12c20fbd4d64c32f9b181ef3b90 (patch)
tree52f64d2eddb8efd489a96c2568462893b15da3d1 /tools/regression
parent69b6924beee8d8135c10dea5036002511d676f9c (diff)
downloadFreeBSD-src-723f201ed84ad12c20fbd4d64c32f9b181ef3b90.zip
FreeBSD-src-723f201ed84ad12c20fbd4d64c32f9b181ef3b90.tar.gz
Add a test of variable evaluation and substitution for make(1), as a start
of tests for it.
Diffstat (limited to 'tools/regression')
-rw-r--r--tools/regression/usr.bin/Makefile2
-rw-r--r--tools/regression/usr.bin/make/Makefile20
-rw-r--r--tools/regression/usr.bin/make/regress.variables.out1
3 files changed, 22 insertions, 1 deletions
diff --git a/tools/regression/usr.bin/Makefile b/tools/regression/usr.bin/Makefile
index c01682d..48cbdd4 100644
--- a/tools/regression/usr.bin/Makefile
+++ b/tools/regression/usr.bin/Makefile
@@ -1,5 +1,5 @@
# $FreeBSD$
-SUBDIR= file2c join jot uudecode uuencode xargs
+SUBDIR= file2c join jot make uudecode uuencode xargs
.include <bsd.subdir.mk>
diff --git a/tools/regression/usr.bin/make/Makefile b/tools/regression/usr.bin/make/Makefile
new file mode 100644
index 0000000..97ecdb5
--- /dev/null
+++ b/tools/regression/usr.bin/make/Makefile
@@ -0,0 +1,20 @@
+# $FreeBSD$
+
+DATA1= helllo
+DATA2:= ${DATA1}
+DATA3= ${DATA2:S/ll/rr/g}
+DATA4:= ${DATA2:S/ll/rr/g}
+DATA2?= allo
+DATA5:= ${DATA2:S/ll/ii/g} ${DATA1:S/ll/rr/g}
+DATA2= yello
+DATA1:= ${DATA5:S/l/r/g}
+
+all:
+ @echo "Running test variables"
+ @echo 1:${DATA1} 2:${DATA2} 3:${DATA3} 4:${DATA4} 5:${DATA5} | \
+ diff -u ${.CURDIR}/regress.variables.out - || ${MAKE} failure
+ @echo "Test variables detected no regression, output matches."
+
+failure:
+ @echo "Test failed: regression detected. See above."
+ @false
diff --git a/tools/regression/usr.bin/make/regress.variables.out b/tools/regression/usr.bin/make/regress.variables.out
new file mode 100644
index 0000000..83528d5
--- /dev/null
+++ b/tools/regression/usr.bin/make/regress.variables.out
@@ -0,0 +1 @@
+1:heiiro herrro 2:yello 3:yerro 4:herrlo 5:heiilo herrlo
OpenPOWER on IntegriCloud