diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2009-11-11 00:16:48 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2009-11-11 00:16:48 +0000 |
commit | 6d744224329449e764ac8eefb83da8311a246977 (patch) | |
tree | 01c5fd448114ad7c4b00287943cca23215a526f3 | |
parent | 5db91da9805ee015db1db9f8f352af0d211cfc7f (diff) |
Regress for skipping evaluation of else-type conditional if previous
corresponding one evaluted to true. espie@ ok.
-rw-r--r-- | regress/usr.bin/make/Makefile | 16 | ||||
-rw-r--r-- | regress/usr.bin/make/mk32 | 13 | ||||
-rw-r--r-- | regress/usr.bin/make/t32.out | 1 | ||||
-rw-r--r-- | regress/usr.bin/make/t33.out | 1 | ||||
-rw-r--r-- | regress/usr.bin/make/t34.out | 1 | ||||
-rw-r--r-- | regress/usr.bin/make/t35.out | 1 |
6 files changed, 31 insertions, 2 deletions
diff --git a/regress/usr.bin/make/Makefile b/regress/usr.bin/make/Makefile index bf3bf0855fe..2897f8c150a 100644 --- a/regress/usr.bin/make/Makefile +++ b/regress/usr.bin/make/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.28 2008/11/24 16:22:38 espie Exp $ +# $OpenBSD: Makefile,v 1.29 2009/11/11 00:16:47 fgsch Exp $ # We don't pass t7, t13, t14, t17, t19, t20 t21 t26 # and t16 yields piss poor performance -REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 t31 +REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 t31 t32 t33 t34 t35 MALLOC_OPTIONS?=AZJ t1: t1.out @@ -129,6 +129,18 @@ t30: t31: cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} ${MAKE} -r -f mk28 all +t32: + cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} B="A" ${MAKE} -r -f mk32 all | diff - t32.out + +t33: + cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} B=0 ${MAKE} -r -f mk32 all | diff - t33.out + +t34: + cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} B=1 ${MAKE} -r -f mk32 all | diff - t34.out + +t35: + cd ${.CURDIR} && env -i PATH=${PATH} MALLOC_OPTIONS=${MALLOC_OPTIONS} B=2 ${MAKE} -r -f mk32 all | diff - t35.out + z.a: touch $@ diff --git a/regress/usr.bin/make/mk32 b/regress/usr.bin/make/mk32 new file mode 100644 index 00000000000..9bb5ccb2803 --- /dev/null +++ b/regress/usr.bin/make/mk32 @@ -0,0 +1,13 @@ +B ?= +.if ${B:C/[0-9]//} +A=0 +.elif ${B} == 0 +A=1 +.elif ${B} > 1 +A=2 +.else +A=3 +.endif + +all: + @echo ${A} diff --git a/regress/usr.bin/make/t32.out b/regress/usr.bin/make/t32.out new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/regress/usr.bin/make/t32.out @@ -0,0 +1 @@ +0 diff --git a/regress/usr.bin/make/t33.out b/regress/usr.bin/make/t33.out new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/regress/usr.bin/make/t33.out @@ -0,0 +1 @@ +1 diff --git a/regress/usr.bin/make/t34.out b/regress/usr.bin/make/t34.out new file mode 100644 index 00000000000..00750edc07d --- /dev/null +++ b/regress/usr.bin/make/t34.out @@ -0,0 +1 @@ +3 diff --git a/regress/usr.bin/make/t35.out b/regress/usr.bin/make/t35.out new file mode 100644 index 00000000000..0cfbf08886f --- /dev/null +++ b/regress/usr.bin/make/t35.out @@ -0,0 +1 @@ +2 |