Add a regression test for bin/5297, regarding sysv substitution with a nil

left-hand-side.
This commit is contained in:
Juli Mallett 2002-05-05 19:02:30 +00:00
parent 7dace039d8
commit a9b736ad72
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96070
4 changed files with 20 additions and 0 deletions

View File

@ -8,6 +8,7 @@ DATA2?= allo
DATA5:= ${DATA2:S/ll/ii/g} ${DATA1:S/ll/rr/g}
DATA2= yello
DATA1:= ${DATA5:S/l/r/g}
NIL=
all:
@echo "Running test variables"
@ -17,6 +18,9 @@ all:
@echo "Running test targets"
@${MAKE} double || ${MAKE} failure
@echo "PASS: Test targets detected no regression."
@echo "Running test sysvmatch"
@${MAKE} sysvmatch || ${MAKE} failure
@echo "PASS: Test sysvmatch detected no regression."
# Doubly-defined targets. NetBSD make(1) will warn, ours will silently use the
# ``right'' one.
@ -26,6 +30,11 @@ double:
double:
@false
# Some versions of FreeBSD make(1) do not handle a nil LHS in sysvsubst.
sysvmatch:
@echo EMPTY ${NIL:=foo} LHS | \
diff -u ${.CURDIR}/regress.sysvmatch.out - || false
failure:
@echo "FAIL: Test failed: regression detected. See above."
@false

View File

@ -0,0 +1 @@
EMPTY LHS

View File

@ -8,6 +8,7 @@ DATA2?= allo
DATA5:= ${DATA2:S/ll/ii/g} ${DATA1:S/ll/rr/g}
DATA2= yello
DATA1:= ${DATA5:S/l/r/g}
NIL=
all:
@echo "Running test variables"
@ -17,6 +18,9 @@ all:
@echo "Running test targets"
@${MAKE} double || ${MAKE} failure
@echo "PASS: Test targets detected no regression."
@echo "Running test sysvmatch"
@${MAKE} sysvmatch || ${MAKE} failure
@echo "PASS: Test sysvmatch detected no regression."
# Doubly-defined targets. NetBSD make(1) will warn, ours will silently use the
# ``right'' one.
@ -26,6 +30,11 @@ double:
double:
@false
# Some versions of FreeBSD make(1) do not handle a nil LHS in sysvsubst.
sysvmatch:
@echo EMPTY ${NIL:=foo} LHS | \
diff -u ${.CURDIR}/regress.sysvmatch.out - || false
failure:
@echo "FAIL: Test failed: regression detected. See above."
@false

View File

@ -0,0 +1 @@
EMPTY LHS