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: add test for confusing error m...
details: https://anonhg.NetBSD.org/src/rev/6ba515a5c4eb
branches: trunk
changeset: 1019014:6ba515a5c4eb
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Feb 23 16:04:16 2021 +0000
description:
make: add test for confusing error message for bad modifier
In the expression ${:U}, the variable name is empty. Since these
expressions are generated by .for loops, the error messages for them
must not end with a trailing space. Putting the variable name in quotes
helps against that.
diffstat:
usr.bin/make/unit-tests/moderrs.exp | 2 ++
usr.bin/make/unit-tests/moderrs.mk | 3 ++-
2 files changed, 4 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 94e3ef171357 -r 6ba515a5c4eb usr.bin/make/unit-tests/moderrs.exp
--- a/usr.bin/make/unit-tests/moderrs.exp Tue Feb 23 16:03:00 2021 +0000
+++ b/usr.bin/make/unit-tests/moderrs.exp Tue Feb 23 16:04:16 2021 +0000
@@ -100,6 +100,8 @@
15152535558513521534
make: Bad modifier `:ts\65oct' for FIB
65oct}
+make: Bad modifier `:ts\65oct' for
+65oct}
make: Bad modifier `:tsxy' for FIB
xy}
diff -r 94e3ef171357 -r 6ba515a5c4eb usr.bin/make/unit-tests/moderrs.mk
--- a/usr.bin/make/unit-tests/moderrs.mk Tue Feb 23 16:03:00 2021 +0000
+++ b/usr.bin/make/unit-tests/moderrs.mk Tue Feb 23 16:04:16 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: moderrs.mk,v 1.26 2021/02/23 15:56:30 rillig Exp $
+# $NetBSD: moderrs.mk,v 1.27 2021/02/23 16:04:16 rillig Exp $
#
# various modifier error tests
@@ -140,6 +140,7 @@
@echo ${FIB:ts}
@echo ${FIB:ts\65} # octal 065 == U+0035 == '5'
@echo ${FIB:ts\65oct} # bad modifier
+ @echo ${:U${FIB}:ts\65oct} # bad modifier, variable name is ""
@echo ${FIB:tsxy} # modifier too long
mod-t-parse: print-header print-footer
Home |
Main Index |
Thread Index |
Old Index