Add a test of variable evaluation and substitution for make(1), as a start
of tests for it.
This commit is contained in:
parent
7320a0ab16
commit
6541d27cad
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95158
20
tools/build/make_check/Makefile
Normal file
20
tools/build/make_check/Makefile
Normal file
@ -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
|
1
tools/build/make_check/regress.variables.out
Normal file
1
tools/build/make_check/regress.variables.out
Normal file
@ -0,0 +1 @@
|
||||
1:heiiro herrro 2:yello 3:yerro 4:herrlo 5:heiilo herrlo
|
@ -1,5 +1,5 @@
|
||||
# $FreeBSD$
|
||||
|
||||
SUBDIR= file2c join jot uudecode uuencode xargs
|
||||
SUBDIR= file2c join jot make uudecode uuencode xargs
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
20
tools/regression/usr.bin/make/Makefile
Normal file
20
tools/regression/usr.bin/make/Makefile
Normal file
@ -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
|
1
tools/regression/usr.bin/make/regress.variables.out
Normal file
1
tools/regression/usr.bin/make/regress.variables.out
Normal file
@ -0,0 +1 @@
|
||||
1:heiiro herrro 2:yello 3:yerro 4:herrlo 5:heiilo herrlo
|
Loading…
Reference in New Issue
Block a user