diff options
-rw-r--r-- | regress/usr.bin/make/Makefile | 11 | ||||
-rw-r--r-- | regress/usr.bin/make/mk11 | 22 | ||||
-rw-r--r-- | regress/usr.bin/make/t11.out | 12 | ||||
-rw-r--r-- | regress/usr.bin/make/t11.out2 | 12 |
4 files changed, 54 insertions, 3 deletions
diff --git a/regress/usr.bin/make/Makefile b/regress/usr.bin/make/Makefile index af18d40c4d7..d5327f2e702 100644 --- a/regress/usr.bin/make/Makefile +++ b/regress/usr.bin/make/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.8 2001/05/15 13:33:09 espie Exp $ +# $OpenBSD: Makefile,v 1.9 2001/05/15 13:40:02 espie Exp $ NOMAN= NOPROG= -regress: t1 t2 t3 t4 t5 t6 t8 t9 t10 t7 +regress: t1 t2 t3 t4 t5 t6 t8 t9 t10 t11 t7 MALLOC_OPTIONS?=AZJ t1: t1.out @@ -54,13 +54,18 @@ t9: t10: z.a cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk10 |diff - t10.out +# check for substitution parser in some confusing situations +t11: + cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk11 |diff - t11.out + cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk11 A=t|diff - t11.out2 + z.a: touch $@ t1.out: echo MACHINE_ARCH=${MACHINE_ARCH} >$@ -.PHONY: t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 regress +.PHONY: t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 regress CLEANFILES+=t1.out z.a diff --git a/regress/usr.bin/make/mk11 b/regress/usr.bin/make/mk11 new file mode 100644 index 00000000000..e8277ba2783 --- /dev/null +++ b/regress/usr.bin/make/mk11 @@ -0,0 +1,22 @@ +# $OpenBSD: mk11,v 1.1 2001/05/15 13:40:02 espie Exp $ + + +V=text +A= + +a: +# we want empty substitutions to work correctly + @echo ${V:C/^$A//} + @echo ${V:C/$A$//} + @echo ${V:C/^${A}//} + @echo ${V:C/${A}$//} +# with replacement text too + @echo ${V:C/^$A/1/} + @echo ${V:C/$A$/1/} + @echo ${V:C/^${A}/1/} + @echo ${V:C/${A}$/1/} +# and with substituted text... + @echo ${V:C/^$A/1\&/} + @echo ${V:C/$A$/1\&/} + @echo ${V:C/^${A}/1\&/} + @echo ${V:C/${A}$/1\&/} diff --git a/regress/usr.bin/make/t11.out b/regress/usr.bin/make/t11.out new file mode 100644 index 00000000000..97282a275ef --- /dev/null +++ b/regress/usr.bin/make/t11.out @@ -0,0 +1,12 @@ +text +text +text +text +1text +text1 +1text +text1 +1text +text1 +1text +text1 diff --git a/regress/usr.bin/make/t11.out2 b/regress/usr.bin/make/t11.out2 new file mode 100644 index 00000000000..a7f2bdc578e --- /dev/null +++ b/regress/usr.bin/make/t11.out2 @@ -0,0 +1,12 @@ +ext +tex +ext +tex +1ext +tex1 +1ext +tex1 +1text +tex1t +1text +tex1t |