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 off-by-one bug ...
details: https://anonhg.NetBSD.org/src/rev/6abf6b51a16e
branches: trunk
changeset: 936130:6abf6b51a16e
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Jul 19 17:24:22 2020 +0000
description:
make(1): demonstrate off-by-one bug in :C modifier
diffstat:
usr.bin/make/unit-tests/modmisc.exp | 10 ++++++++++
usr.bin/make/unit-tests/modmisc.mk | 11 ++++++++++-
2 files changed, 20 insertions(+), 1 deletions(-)
diffs (47 lines):
diff -r 4dd4a48adca2 -r 6abf6b51a16e usr.bin/make/unit-tests/modmisc.exp
--- a/usr.bin/make/unit-tests/modmisc.exp Sun Jul 19 16:48:48 2020 +0000
+++ b/usr.bin/make/unit-tests/modmisc.exp Sun Jul 19 17:24:22 2020 +0000
@@ -51,4 +51,14 @@
mod-loop-dollar:$${word}$:
mod-loop-dollar:$$5$$:
mod-loop-dollar:$$${word}$$:
+mod-C-limits:00-ok:1 2323 45456
+mod-C-limits:11-missing:1 6
+mod-C-limits:11-ok:1 22 446
+make: No subexpression \2
+make: No subexpression \2
+make: No subexpression \2
+make: No subexpression \2
+mod-C-limits:22-missing:1 6
+mod-C-limits:22-missing:1 6
+mod-C-limits:22-ok:1 33 556
exit status 0
diff -r 4dd4a48adca2 -r 6abf6b51a16e usr.bin/make/unit-tests/modmisc.mk
--- a/usr.bin/make/unit-tests/modmisc.mk Sun Jul 19 16:48:48 2020 +0000
+++ b/usr.bin/make/unit-tests/modmisc.mk Sun Jul 19 17:24:22 2020 +0000
@@ -1,4 +1,4 @@
-# $Id: modmisc.mk,v 1.13 2020/07/19 15:16:22 rillig Exp $
+# $Id: modmisc.mk,v 1.14 2020/07/19 17:24:22 rillig Exp $
#
# miscellaneous modifier tests
@@ -18,6 +18,7 @@
all: modvar modvarloop modsysv mod-HTE emptyvar undefvar
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
modsysv:
@echo "The answer is ${libfoo.a:L:libfoo.a=42}"
@@ -133,3 +134,11 @@
@echo $@:${:U4:@word@$$$${word}$$$$@:Q}:
@echo $@:${:U5:@word@$$$$${word}$$$$$@:Q}:
@echo $@:${:U6:@word@$$$$$${word}$$$$$$@:Q}:
+
+mod-C-limits:
+ @echo $@:00-ok:${:U1 23 456:C,..,\0\0,:Q}
+ @echo $@:11-missing:${:U1 23 456:C,..,\1\1,:Q}
+ @echo $@:11-ok:${:U1 23 456:C,(.).,\1\1,:Q}
+ @echo $@:22-missing:${:U1 23 456:C,..,\2\2,:Q}
+ @echo $@:22-missing:${:U1 23 456:C,(.).,\2\2,:Q}
+ @echo $@:22-ok:${:U1 23 456:C,(.)(.),\2\2,:Q}
Home |
Main Index |
Thread Index |
Old Index