Add a test for what was fixed in revs. 1.28 and 1.29 of make/str.c.

This commit is contained in:
Ruslan Ermilov 2004-01-29 22:51:36 +00:00
parent 08e33a7ff1
commit 9608d7e2cd
2 changed files with 22 additions and 0 deletions

View File

@ -47,6 +47,9 @@ all:
@echo "Running test PATH_exists"
@${MAKE} PATH_exists || ${MAKE} failure
@echo "PASS: Test PATH_exists detected no regression."
@echo "Running test double_quotes"
@${MAKE} double_quotes || ${MAKE} failure
@echo "PASS: Test double_quotes detected no regression."
.if make(double)
# Doubly-defined targets. make(1) will warn, but use the "right" one. If it
@ -113,6 +116,14 @@ PATH_exists:
.endif
.endif
.if make(double_quotes)
VALUE= foo ""
double_quotes:
.if ${VALUE:S/$//} != ${VALUE}
.error "" reduced to "
.endif
.endif
failure:
@echo "FAIL: Test failed: regression detected. See above."
@false

View File

@ -47,6 +47,9 @@ all:
@echo "Running test PATH_exists"
@${MAKE} PATH_exists || ${MAKE} failure
@echo "PASS: Test PATH_exists detected no regression."
@echo "Running test double_quotes"
@${MAKE} double_quotes || ${MAKE} failure
@echo "PASS: Test double_quotes detected no regression."
.if make(double)
# Doubly-defined targets. make(1) will warn, but use the "right" one. If it
@ -113,6 +116,14 @@ PATH_exists:
.endif
.endif
.if make(double_quotes)
VALUE= foo ""
double_quotes:
.if ${VALUE:S/$//} != ${VALUE}
.error "" reduced to "
.endif
.endif
failure:
@echo "FAIL: Test failed: regression detected. See above."
@false