Module Name: src Committed By: rillig Date: Tue Feb 23 16:04:16 UTC 2021
Modified Files: src/usr.bin/make/unit-tests: moderrs.exp moderrs.mk Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.bin/make/unit-tests/moderrs.exp cvs rdiff -u -r1.26 -r1.27 src/usr.bin/make/unit-tests/moderrs.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/unit-tests/moderrs.exp diff -u src/usr.bin/make/unit-tests/moderrs.exp:1.27 src/usr.bin/make/unit-tests/moderrs.exp:1.28 --- src/usr.bin/make/unit-tests/moderrs.exp:1.27 Tue Feb 23 15:56:30 2021 +++ src/usr.bin/make/unit-tests/moderrs.exp Tue Feb 23 16:04:16 2021 @@ -100,6 +100,8 @@ mod-ts-parse: 15152535558513521534 make: Bad modifier `:ts\65oct' for FIB 65oct} +make: Bad modifier `:ts\65oct' for +65oct} make: Bad modifier `:tsxy' for FIB xy} Index: src/usr.bin/make/unit-tests/moderrs.mk diff -u src/usr.bin/make/unit-tests/moderrs.mk:1.26 src/usr.bin/make/unit-tests/moderrs.mk:1.27 --- src/usr.bin/make/unit-tests/moderrs.mk:1.26 Tue Feb 23 15:56:30 2021 +++ src/usr.bin/make/unit-tests/moderrs.mk Tue Feb 23 16:04:16 2021 @@ -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 @@ mod-ts-parse: print-header print-footer @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