Module Name:    src
Committed By:   rillig
Date:           Sun Nov  1 10:46:34 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: moderrs.exp moderrs.mk

Log Message:
make(1): separate sections of moderrs.mk with empty lines


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/moderrs.exp
cvs rdiff -u -r1.18 -r1.19 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.17 src/usr.bin/make/unit-tests/moderrs.exp:1.18
--- src/usr.bin/make/unit-tests/moderrs.exp:1.17	Sun Nov  1 10:12:38 2020
+++ src/usr.bin/make/unit-tests/moderrs.exp	Sun Nov  1 10:46:34 2020
@@ -2,22 +2,27 @@ modunkn:
 Expect: Unknown modifier 'Z'
 make: Unknown modifier 'Z'
 VAR:Z=
+
 modunknV:
 Expect: Unknown modifier 'Z'
 make: Unknown modifier 'Z'
 VAR:Z=
+
 varterm:
 Expect: Unclosed variable specification for VAR
 make: Unclosed variable specification (expecting '}') for "VAR" (value "Thevariable") modifier S
 VAR:S,V,v,=Thevariable
+
 vartermV:
 Expect: Unclosed variable specification for VAR
 make: Unclosed variable specification after complex modifier (expecting '}') for VAR
 VAR:S,V,v,=Thevariable
+
 modtermV:
 Expect: Unfinished modifier for VAR (',' missing)
 make: Unfinished modifier for VAR (',' missing)
 VAR:S,V,v=
+
 modloop:
 Expect: 2 errors about missing @ delimiter
 make: Unfinished modifier for UNDEF ('@' missing)
@@ -25,10 +30,12 @@ make: Unfinished modifier for UNDEF ('@'
 make: Unfinished modifier for UNDEF ('@' missing)
 
 1 2 3
+
 modloop-close:
 make: Unclosed variable specification (expecting '}') for "UNDEF" (value "1}... 2}... 3}...") modifier @
 1}... 2}... 3}...
 1}... 2}... 3}...
+
 modwords:
 Expect: 2 errors about missing ] delimiter
 make: Unfinished modifier for UNDEF (']' missing)
@@ -37,12 +44,14 @@ make: Unfinished modifier for UNDEF (']'
 
 13=
 12345=ok
+
 modexclam:
 Expect: 2 errors about missing ! delimiter
 make: Unfinished modifier for VARNAME ('!' missing)
 
 make: Unfinished modifier for ! ('!' missing)
 
+
 mod-subst-delimiter:
 make: Missing delimiter for :S modifier
 
@@ -70,6 +79,7 @@ make: Unfinished modifier for VAR (',' m
 make: Unclosed variable specification (expecting '}') for "VAR" (value "TheVariable") modifier S
 TheVariable
 TheVariable
+
 mod-regex-delimiter:
 make: Missing delimiter for :C modifier
 
@@ -97,6 +107,7 @@ make: Unfinished modifier for VAR (',' m
 make: Unclosed variable specification (expecting '}') for "VAR" (value "TheVariable") modifier C
 TheVariable
 TheVariable
+
 mod-regex-undefined-subexpression:
 one one 2 3 5 8 one3 2one 34
 make: No match for subexpression \2
@@ -105,6 +116,7 @@ make: No match for subexpression \1
 make: No match for subexpression \2
 make: No match for subexpression \1
 ()+() ()+() ()+() 3 5 8 (3)+() ()+(1) 34
+
 mod-ts-parse:
 112358132134
 15152535558513521534
@@ -112,6 +124,7 @@ make: Bad modifier `:ts\65oct' for FIB
 65oct}
 make: Bad modifier `:tsxy' for FIB
 xy}
+
 mod-t-parse:
 make: Bad modifier `:t' for FIB
 
@@ -121,6 +134,7 @@ make: Bad modifier `:t' for FIB
 
 make: Bad modifier `:t' for FIB
 M*}
+
 mod-ifelse-parse:
 make: Unfinished modifier for FIB (':' missing)
 
@@ -131,10 +145,12 @@ make: Unfinished modifier for FIB ('}' m
 make: Unfinished modifier for FIB ('}' missing)
 
 then
+
 mod-remember-parse:
 1 1 2 3 5 8 13 21 34
 make: Unknown modifier '_'
 
+
 mod-sysv-parse:
 make: Unknown modifier '3'
 make: Unclosed variable specification (expecting '}') for "FIB" (value "") modifier 3
@@ -146,4 +162,5 @@ make: Unknown modifier '3'
 make: Unclosed variable specification (expecting '}') for "FIB" (value "") modifier 3
 
 1 1 2 x3 5 8 1x3 21 34
+
 exit status 0

Index: src/usr.bin/make/unit-tests/moderrs.mk
diff -u src/usr.bin/make/unit-tests/moderrs.mk:1.18 src/usr.bin/make/unit-tests/moderrs.mk:1.19
--- src/usr.bin/make/unit-tests/moderrs.mk:1.18	Sun Nov  1 10:12:38 2020
+++ src/usr.bin/make/unit-tests/moderrs.mk	Sun Nov  1 10:46:34 2020
@@ -1,4 +1,4 @@
-# $NetBSD: moderrs.mk,v 1.18 2020/11/01 10:12:38 rillig Exp $
+# $NetBSD: moderrs.mk,v 1.19 2020/11/01 10:46:34 rillig Exp $
 #
 # various modifier error tests
 
@@ -23,27 +23,27 @@ all:	mod-ifelse-parse
 all:	mod-remember-parse
 all:	mod-sysv-parse
 
-modunkn: print-name
+modunkn: print-header print-footer
 	@echo "Expect: Unknown modifier 'Z'"
 	@echo "VAR:Z=${VAR:Z}"
 
-modunknV: print-name
+modunknV: print-header print-footer
 	@echo "Expect: Unknown modifier 'Z'"
 	@echo "VAR:${MOD_UNKN}=${VAR:${MOD_UNKN}}"
 
-varterm: print-name
+varterm: print-header print-footer
 	@echo "Expect: Unclosed variable specification for VAR"
 	@echo VAR:S,V,v,=${VAR:S,V,v,
 
-vartermV: print-name
+vartermV: print-header print-footer
 	@echo "Expect: Unclosed variable specification for VAR"
 	@echo VAR:${MOD_TERM},=${VAR:${MOD_S}
 
-modtermV: print-name
+modtermV: print-header print-footer
 	@echo "Expect: Unfinished modifier for VAR (',' missing)"
 	-@echo "VAR:${MOD_TERM}=${VAR:${MOD_TERM}}"
 
-modloop: print-name
+modloop: print-header print-footer
 	@echo "Expect: 2 errors about missing @ delimiter"
 	@echo ${UNDEF:U1 2 3:@var}
 	@echo ${UNDEF:U1 2 3:@var@...}
@@ -55,11 +55,11 @@ modloop: print-name
 # braces must be balanced.
 # This is also contrary to the SysV modifier, where only the actually
 # used delimiter (either braces or parentheses) must be balanced.
-modloop-close: print-name
+modloop-close: print-header print-footer
 	@echo ${UNDEF:U1 2 3:@var@${var}}...@
 	@echo ${UNDEF:U1 2 3:@var@${var}}...@}
 
-modwords: print-name
+modwords: print-header print-footer
 	@echo "Expect: 2 errors about missing ] delimiter"
 	@echo ${UNDEF:U1 2 3:[}
 	@echo ${UNDEF:U1 2 3:[#}
@@ -80,7 +80,7 @@ modwords: print-name
 	# which is empty.
 	@echo 12345=${UNDEF:U1 2 3:[123451234512345123451234512345]:S,^$,ok,:S,^3$,ok,}
 
-modexclam: print-name
+modexclam: print-header print-footer
 	@echo "Expect: 2 errors about missing ! delimiter"
 	@echo ${VARNAME:!echo}
 	# When the final exclamation mark is missing, there is no
@@ -89,7 +89,7 @@ modexclam: print-name
 	# and the above would have produced an "Unknown modifier '!'".
 	@echo ${!:L:!=exclam}
 
-mod-subst-delimiter: print-name
+mod-subst-delimiter: print-header print-footer
 	@echo ${VAR:S
 	@echo ${VAR:S,
 	@echo ${VAR:S,from
@@ -105,7 +105,7 @@ mod-subst-delimiter: print-name
 	@echo ${VAR:S,from,to,
 	@echo ${VAR:S,from,to,}
 
-mod-regex-delimiter: print-name
+mod-regex-delimiter: print-header print-footer
 	@echo ${VAR:C
 	@echo ${VAR:C,
 	@echo ${VAR:C,from
@@ -133,38 +133,40 @@ mod-regex-delimiter: print-name
 # mod-subst-chain).  Luckily the modifier :U does not make sense after :C,
 # therefore this case does not happen in practice.
 # The sub-modifier for the :C modifier would have to be chosen wisely.
-mod-regex-undefined-subexpression: print-name
+mod-regex-undefined-subexpression: print-header print-footer
 	@echo ${FIB:C,1(.*),one\1,}		# all ok
 	@echo ${FIB:C,1(.*)|2(.*),(\1)+(\2),:Q}	# no match for subexpression
 
-mod-ts-parse: print-name
+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 ${FIB:tsxy}	# modifier too long
 
-mod-t-parse: print-name
+mod-t-parse: print-header print-footer
 	@echo ${FIB:t
 	@echo ${FIB:txy}
 	@echo ${FIB:t}
 	@echo ${FIB:t:M*}
 
-mod-ifelse-parse: print-name
+mod-ifelse-parse: print-header print-footer
 	@echo ${FIB:?
 	@echo ${FIB:?then
 	@echo ${FIB:?then:
 	@echo ${FIB:?then:else
 	@echo ${FIB:?then:else}
 
-mod-remember-parse: print-name
+mod-remember-parse: print-header print-footer
 	@echo ${FIB:_}		# ok
 	@echo ${FIB:__}		# modifier name too long
 
-mod-sysv-parse: print-name
+mod-sysv-parse: print-header print-footer
 	@echo ${FIB:3
 	@echo ${FIB:3=
 	@echo ${FIB:3=x3
 	@echo ${FIB:3=x3}	# ok
 
-print-name: .USEBEFORE
+print-header: .USEBEFORE
 	@echo $@:
+print-footer: .USE
+	@echo

Reply via email to