tests/make: reduce trailing whitespace

This commit is contained in:
rillig 2022-09-25 12:51:37 +00:00
parent 9cc225e6d6
commit d4d80b7c61
8 changed files with 33 additions and 33 deletions

View File

@ -1,9 +1,9 @@
: undefined eol
: undefined--eol
make: Unclosed variable "UNCLOSED"
: unclosed-variable
: unclosed-variable-
make: Unclosed variable expression (expecting '}') for "UNCLOSED"
: unclosed-modifier
: unclosed-modifier-
make: Unknown modifier "Z"
: unknown-modifier eol
: end eol
: unknown-modifier--eol
: end-eol
exit status 0

View File

@ -1,4 +1,4 @@
# $NetBSD: cmd-errors-jobs.mk,v 1.1 2020/12/27 05:11:40 rillig Exp $
# $NetBSD: cmd-errors-jobs.mk,v 1.2 2022/09/25 12:51:37 rillig Exp $
#
# Demonstrate how errors in variable expansions affect whether the commands
# are actually executed in jobs mode.
@ -9,24 +9,24 @@ all: undefined unclosed-variable unclosed-modifier unknown-modifier end
# Undefined variables are not an error. They expand to empty strings.
undefined:
: $@ ${UNDEFINED} eol
: $@-${UNDEFINED}-eol
# XXX: As of 2020-11-01, this command is executed even though it contains
# parse errors.
unclosed-variable:
: $@ ${UNCLOSED
: $@-${UNCLOSED
# XXX: As of 2020-11-01, this command is executed even though it contains
# parse errors.
unclosed-modifier:
: $@ ${UNCLOSED:
: $@-${UNCLOSED:
# XXX: As of 2020-11-01, this command is executed even though it contains
# parse errors.
unknown-modifier:
: $@ ${UNKNOWN:Z} eol
: $@-${UNKNOWN:Z}-eol
end:
: $@ eol
: $@-eol
# XXX: As of 2020-11-02, despite the parse errors, the exit status is 0.

View File

@ -1,9 +1,9 @@
: undefined eol
: undefined--eol
make: Unclosed variable "UNCLOSED"
: unclosed-variable
: unclosed-variable-
make: Unclosed variable expression (expecting '}') for "UNCLOSED"
: unclosed-modifier
: unclosed-modifier-
make: Unknown modifier "Z"
: unknown-modifier eol
: end eol
: unknown-modifier--eol
: end-eol
exit status 0

View File

@ -1,4 +1,4 @@
# $NetBSD: cmd-errors.mk,v 1.4 2020/12/27 05:11:40 rillig Exp $
# $NetBSD: cmd-errors.mk,v 1.5 2022/09/25 12:51:37 rillig Exp $
#
# Demonstrate how errors in variable expansions affect whether the commands
# are actually executed in compat mode.
@ -7,24 +7,24 @@ all: undefined unclosed-variable unclosed-modifier unknown-modifier end
# Undefined variables are not an error. They expand to empty strings.
undefined:
: $@ ${UNDEFINED} eol
: $@-${UNDEFINED}-eol
# XXX: As of 2020-11-01, this command is executed even though it contains
# parse errors.
unclosed-variable:
: $@ ${UNCLOSED
: $@-${UNCLOSED
# XXX: As of 2020-11-01, this command is executed even though it contains
# parse errors.
unclosed-modifier:
: $@ ${UNCLOSED:
: $@-${UNCLOSED:
# XXX: As of 2020-11-01, this command is executed even though it contains
# parse errors.
unknown-modifier:
: $@ ${UNKNOWN:Z} eol
: $@-${UNKNOWN:Z}-eol
end:
: $@ eol
: $@-eol
# XXX: As of 2020-11-02, despite the parse errors, the exit status is 0.

View File

@ -9,11 +9,11 @@ Comparing "\" != "\"
CondParser_Eval: ${:U#hash} != #hash
Comparing "#hash" != "#hash"
CondParser_Eval: 0 # This is treated as a comment, but why?
CondParser_Eval: ${0 # comment :?yes:no} != no
CondParser_Eval: 0 # comment
CondParser_Eval: ${0 # comment:?yes:no} != no
CondParser_Eval: 0 # comment
Comparing "no" != "no"
CondParser_Eval: ${1 # comment :?yes:no} != yes
CondParser_Eval: 1 # comment
CondParser_Eval: ${1 # comment:?yes:no} != yes
CondParser_Eval: 1 # comment
Comparing "yes" != "yes"
CondParser_Eval: ${UNDEF:Uundefined}!=undefined
Comparing "undefined" != "undefined"

View File

@ -1,4 +1,4 @@
# $NetBSD: cond-token-plain.mk,v 1.15 2021/12/30 02:14:55 rillig Exp $
# $NetBSD: cond-token-plain.mk,v 1.16 2022/09/25 12:51:37 rillig Exp $
#
# Tests for plain tokens (that is, string literals without quotes)
# in .if conditions. These are also called bare words.
@ -63,10 +63,10 @@
# anybody really use this? This is neither documented nor obvious since
# the '#' is escaped. It's much clearer to write a comment in the line
# above the condition.
.if ${0 \# comment :?yes:no} != no
.if ${0 \# comment:?yes:no} != no
. error
.endif
.if ${1 \# comment :?yes:no} != yes
.if ${1 \# comment:?yes:no} != yes
. error
.endif

View File

@ -11,8 +11,8 @@ Comparing 1.000000 == 0.000000
make: Bad conditional expression '1 == == 2' in '1 == == 2?yes:no'
Comparing "" != ""
make: "varmod-ifelse.mk" line 92: warning: Oops, the parse error should have been propagated.
CondParser_Eval: ${ ${:U\$}{VAR} == value :?ok:bad} != "ok"
CondParser_Eval: ${VAR} == value
CondParser_Eval: ${ ${:U\$}{VAR} == value:?ok:bad} != "ok"
CondParser_Eval: ${VAR} == value
Comparing "value" == "value"
Comparing "ok" != "ok"
make: "varmod-ifelse.mk" line 153: no.

View File

@ -1,4 +1,4 @@
# $NetBSD: varmod-ifelse.mk,v 1.19 2022/05/08 06:51:27 rillig Exp $
# $NetBSD: varmod-ifelse.mk,v 1.20 2022/09/25 12:51:37 rillig Exp $
#
# Tests for the ${cond:?then:else} variable modifier, which evaluates either
# the then-expression or the else-expression, depending on the condition.
@ -106,7 +106,7 @@ COND:= ${${UNDEF} == "":?bad-assign:bad-assign}
# from the parser of the .for loop body. See ForLoop_SubstVarLong.
.MAKEFLAGS: -dc
VAR= value
.if ${ ${:U\$}{VAR} == value :?ok:bad} != "ok"
.if ${ ${:U\$}{VAR} == value:?ok:bad} != "ok"
. error
.endif
.MAKEFLAGS: -d0