Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make/unit-tests Add unit-test for discarded :?
details: https://anonhg.NetBSD.org/src/rev/d96febdc3a06
branches: trunk
changeset: 340946:d96febdc3a06
user: sjg <sjg%NetBSD.org@localhost>
date: Mon Oct 12 17:09:29 2015 +0000
description:
Add unit-test for discarded :?
diffstat:
usr.bin/make/unit-tests/varmisc.exp | 2 ++
usr.bin/make/unit-tests/varmisc.mk | 8 ++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r 39f977f7db03 -r d96febdc3a06 usr.bin/make/unit-tests/varmisc.exp
--- a/usr.bin/make/unit-tests/varmisc.exp Mon Oct 12 16:48:13 2015 +0000
+++ b/usr.bin/make/unit-tests/varmisc.exp Mon Oct 12 17:09:29 2015 +0000
@@ -15,4 +15,6 @@
:? only rhs when value false
false
FALSE
+do not evaluate or expand :? if discarding
+is set
exit status 0
diff -r 39f977f7db03 -r d96febdc3a06 usr.bin/make/unit-tests/varmisc.mk
--- a/usr.bin/make/unit-tests/varmisc.mk Mon Oct 12 16:48:13 2015 +0000
+++ b/usr.bin/make/unit-tests/varmisc.mk Mon Oct 12 17:09:29 2015 +0000
@@ -1,8 +1,8 @@
-# $Id: varmisc.mk,v 1.4 2015/10/11 06:32:15 sjg Exp $
+# $Id: varmisc.mk,v 1.5 2015/10/12 17:09:29 sjg Exp $
#
# Miscellaneous variable tests.
-all: unmatched_var_paren D_true U_true D_false U_false Q_lhs Q_rhs
+all: unmatched_var_paren D_true U_true D_false U_false Q_lhs Q_rhs NQ_none
unmatched_var_paren:
@echo ${foo::=foo-text}
@@ -36,3 +36,7 @@
Q_rhs:
@echo :? only rhs when value false
@echo ${0:L:?${True}:${False}}
+
+NQ_none:
+ @echo do not evaluate or expand :? if discarding
+ @echo ${VSET:U${1:L:?${True}:${False}}}
Home |
Main Index |
Thread Index |
Old Index