Module Name: src Committed By: rillig Date: Mon Feb 27 08:29:36 UTC 2023
Modified Files: src/usr.bin/make/unit-tests: varmod-order.exp varmod-order.mk Log Message: tests/make: describe the absent fallback for ':O' modifiers more clearly To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/varmod-order.exp cvs rdiff -u -r1.9 -r1.10 src/usr.bin/make/unit-tests/varmod-order.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/varmod-order.exp diff -u src/usr.bin/make/unit-tests/varmod-order.exp:1.6 src/usr.bin/make/unit-tests/varmod-order.exp:1.7 --- src/usr.bin/make/unit-tests/varmod-order.exp:1.6 Sun Feb 26 06:08:06 2023 +++ src/usr.bin/make/unit-tests/varmod-order.exp Mon Feb 27 08:29:36 2023 @@ -20,7 +20,7 @@ make: "varmod-order.mk" line 77: Malform make: Bad modifier ":Orrn" for variable "NUMBERS" make: "varmod-order.mk" line 86: Malformed conditional (${NUMBERS:Orrn}) make: Bad modifier ":On=Off" for variable "SWITCH" -make: "varmod-order.mk" line 96: Malformed conditional (${SWITCH:UOn:On=Off} != "Off") +make: "varmod-order.mk" line 100: Malformed conditional (${SWITCH:On=Off} != "Off") make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/varmod-order.mk diff -u src/usr.bin/make/unit-tests/varmod-order.mk:1.9 src/usr.bin/make/unit-tests/varmod-order.mk:1.10 --- src/usr.bin/make/unit-tests/varmod-order.mk:1.9 Sun Feb 26 06:08:06 2023 +++ src/usr.bin/make/unit-tests/varmod-order.mk Mon Feb 27 08:29:36 2023 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-order.mk,v 1.9 2023/02/26 06:08:06 rillig Exp $ +# $NetBSD: varmod-order.mk,v 1.10 2023/02/27 08:29:36 rillig Exp $ # # Tests for the :O variable modifier and its variants, which either sort the # words of the value or shuffle them. @@ -90,10 +90,14 @@ _:= ${NUMBERS:Onr .endif -# Any modifier that starts with 'O' either sorts or shuffles the words. Other -# than for many other modifiers, there is no fallback to the SysV modifier -# ':from=to'. -.if ${SWITCH:UOn:On=Off} != "Off" +# If a modifier that starts with ':O' is not one of the known sort or shuffle +# forms, it is a parse error. Several other modifiers such as ':H' or ':u' +# fall back to the SysV modifier, for example, ':H=new' is not the standard +# ':H' modifier but instead replaces a trailing 'H' with 'new' in each word. +# There is no such fallback for the ':O' modifiers. +SWITCH= On +# expect: make: Bad modifier ":On=Off" for variable "SWITCH" +.if ${SWITCH:On=Off} != "Off" . error .else . error