mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-25 10:01:02 +01:00
Add a regression test for bin/5297, regarding sysv substitution with a nil
left-hand-side.
This commit is contained in:
parent
087f3b7f31
commit
62cedbf5fc
@ -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