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 make(1): demonstrate wrong error mes...



details:   https://anonhg.NetBSD.org/src/rev/72beb1ff076f
branches:  trunk
changeset: 936275:72beb1ff076f
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Jul 23 19:46:55 2020 +0000

description:
make(1): demonstrate wrong error message about missing delimiter

The current practice of setting st->delim at the beginning of each
modifier and resetting it again at the end produces too many error
messages.  In this case, there is no missing delimiter.

diffstat:

 usr.bin/make/unit-tests/modmisc.exp |  3 +++
 usr.bin/make/unit-tests/modmisc.mk  |  6 +++++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diffs (40 lines):

diff -r b78273f1ec69 -r 72beb1ff076f usr.bin/make/unit-tests/modmisc.exp
--- a/usr.bin/make/unit-tests/modmisc.exp       Thu Jul 23 19:32:54 2020 +0000
+++ b/usr.bin/make/unit-tests/modmisc.exp       Thu Jul 23 19:46:55 2020 +0000
@@ -73,6 +73,9 @@
 mod-C-limits:22-missing:1 6
 mod-C-limits:22-ok:1 33 556
 mod-C-limits:capture:ihgfedcbaabcdefghijABCDEFGHIJa0a1a2rest
+make: RE substitution error: (details omitted)
+make: Unclosed substitution for UNDEF (, missing)
+mod-C-errors:
 mod-assign: first=1.
 mod-assign: last=3.
 mod-assign: appended=1 2 3.
diff -r b78273f1ec69 -r 72beb1ff076f usr.bin/make/unit-tests/modmisc.mk
--- a/usr.bin/make/unit-tests/modmisc.mk        Thu Jul 23 19:32:54 2020 +0000
+++ b/usr.bin/make/unit-tests/modmisc.mk        Thu Jul 23 19:46:55 2020 +0000
@@ -1,4 +1,4 @@
-# $Id: modmisc.mk,v 1.20 2020/07/21 23:19:46 rillig Exp $
+# $Id: modmisc.mk,v 1.21 2020/07/23 19:46:55 rillig Exp $
 #
 # miscellaneous modifier tests
 
@@ -19,6 +19,7 @@
 all:   mod-S mod-C mod-at-varname mod-at-resolve mod-at-dollar
 all:   mod-subst-dollar mod-loop-dollar
 all:   mod-C-limits
+all:   mod-C-errors
 all:   mod-assign
 all:   mod-assign-nested
 all:   mod-tu-space
@@ -153,6 +154,9 @@
        # which is more than enough for daily use.
        @echo $@:capture:${:UabcdefghijABCDEFGHIJrest:C,(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)(.),\9\8\7\6\5\4\3\2\1\0\10\11\12,}
 
+mod-C-errors:
+       @echo $@: ${UNDEF:Uvalue:C,[,,}
+
 # Just a bit of basic code coverage for the obscure ::= assignment modifiers.
 mod-assign:
        @echo $@: ${1 2 3:L:@i@${FIRST::?=$i}@} first=${FIRST}.



Home | Main Index | Thread Index | Old Index