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 test case for :M[^A-Z]



details:   https://anonhg.NetBSD.org/src/rev/e677192353c0
branches:  trunk
changeset: 823133:e677192353c0
user:      sjg <sjg%NetBSD.org@localhost>
date:      Thu Apr 13 16:23:39 2017 +0000

description:
Add test case for :M[^A-Z]

diffstat:

 usr.bin/make/unit-tests/modmatch.exp |   2 ++
 usr.bin/make/unit-tests/modmatch.mk  |  10 +++++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r 1292d4913539 -r e677192353c0 usr.bin/make/unit-tests/modmatch.exp
--- a/usr.bin/make/unit-tests/modmatch.exp      Thu Apr 13 14:46:32 2017 +0000
+++ b/usr.bin/make/unit-tests/modmatch.exp      Thu Apr 13 16:23:39 2017 +0000
@@ -14,4 +14,6 @@
 LIB=e X_LIBS:M*/lib${LIB}.a is "/tmp/libe.a"
 LIB=e X_LIBS:M*/lib${LIB}.a:tu is "/TMP/LIBE.A"
 Mscanner=OK
+Upper=One Two Three Four
+Lower=five six seven
 exit status 0
diff -r 1292d4913539 -r e677192353c0 usr.bin/make/unit-tests/modmatch.mk
--- a/usr.bin/make/unit-tests/modmatch.mk       Thu Apr 13 14:46:32 2017 +0000
+++ b/usr.bin/make/unit-tests/modmatch.mk       Thu Apr 13 16:23:39 2017 +0000
@@ -15,7 +15,9 @@
 res = OK
 .endif
 
-all:
+all:   show-libs check-cclass
+
+show-libs:
        @for x in $X; do ${.MAKE} -f ${MAKEFILE} show LIB=$$x; done
        @echo "Mscanner=${res}"
 
@@ -23,3 +25,9 @@
        @echo 'LIB=${LIB} X_LIBS:M$${LIB$${LIB:tu}} is "${X_LIBS:M${LIB${LIB:tu}}}"'
        @echo 'LIB=${LIB} X_LIBS:M*/lib$${LIB}.a is "${X_LIBS:M*/lib${LIB}.a}"'
        @echo 'LIB=${LIB} X_LIBS:M*/lib$${LIB}.a:tu is "${X_LIBS:M*/lib${LIB}.a:tu}"'
+
+LIST= One Two Three Four five six seven
+
+check-cclass:
+       @echo Upper=${LIST:M[A-Z]*}
+       @echo Lower=${LIST:M[^A-Z]*}



Home | Main Index | Thread Index | Old Index