Add a regression test for bin/5297, regarding sysv substitution with a nil
left-hand-side.
This commit is contained in:
parent
7dace039d8
commit
a9b736ad72
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96070
@ -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
|
||||
|
1
tools/build/make_check/regress.sysvmatch.out
Normal file
1
tools/build/make_check/regress.sysvmatch.out
Normal file
@ -0,0 +1 @@
|
||||
EMPTY LHS
|
@ -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
|
||||
|
1
tools/regression/usr.bin/make/regress.sysvmatch.out
Normal file
1
tools/regression/usr.bin/make/regress.sysvmatch.out
Normal file
@ -0,0 +1 @@
|
||||
EMPTY LHS
|
Loading…
Reference in New Issue
Block a user