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 tests/make: force line-based diagnos...
details: https://anonhg.NetBSD.org/src/rev/f8aae8355f2e
branches: trunk
changeset: 376113:f8aae8355f2e
user: rillig <rillig%NetBSD.org@localhost>
date: Thu Jun 01 20:56:35 2023 +0000
description:
tests/make: force line-based diagnostics to be listed in the tests
This way, contradictions between the intended output and the actual
output are closer together and have a better chance of being spotted.
diffstat:
usr.bin/make/unit-tests/check-expect.lua | 24 +---
usr.bin/make/unit-tests/cmdline-undefined.exp | 24 ++--
usr.bin/make/unit-tests/cmdline-undefined.mk | 14 ++-
usr.bin/make/unit-tests/cond-cmp-numeric-eq.exp | 4 +-
usr.bin/make/unit-tests/cond-cmp-numeric-eq.mk | 4 +-
usr.bin/make/unit-tests/cond-cmp-unary.exp | 2 +-
usr.bin/make/unit-tests/cond-cmp-unary.mk | 3 +-
usr.bin/make/unit-tests/cond-eof.exp | 6 +-
usr.bin/make/unit-tests/cond-eof.mk | 4 +-
usr.bin/make/unit-tests/cond-func-defined.exp | 10 +-
usr.bin/make/unit-tests/cond-func-defined.mk | 8 +-
usr.bin/make/unit-tests/cond-func-empty.exp | 4 +-
usr.bin/make/unit-tests/cond-func-empty.mk | 5 +-
usr.bin/make/unit-tests/cond-func.exp | 18 +-
usr.bin/make/unit-tests/cond-func.mk | 12 +-
usr.bin/make/unit-tests/cond-op-and-lint.exp | 2 +-
usr.bin/make/unit-tests/cond-op-and-lint.mk | 3 +-
usr.bin/make/unit-tests/cond-op-and.exp | 8 +-
usr.bin/make/unit-tests/cond-op-and.mk | 6 +-
usr.bin/make/unit-tests/cond-op-not.exp | 12 +-
usr.bin/make/unit-tests/cond-op-not.mk | 8 +-
usr.bin/make/unit-tests/cond-op-or-lint.exp | 2 +-
usr.bin/make/unit-tests/cond-op-or-lint.mk | 3 +-
usr.bin/make/unit-tests/cond-op-or.exp | 8 +-
usr.bin/make/unit-tests/cond-op-or.mk | 6 +-
usr.bin/make/unit-tests/cond-op-parentheses.exp | 4 +-
usr.bin/make/unit-tests/cond-op-parentheses.mk | 4 +-
usr.bin/make/unit-tests/cond-op.exp | 37 +++---
usr.bin/make/unit-tests/cond-op.mk | 28 +++-
usr.bin/make/unit-tests/cond-token-number.exp | 8 +-
usr.bin/make/unit-tests/cond-token-number.mk | 6 +-
usr.bin/make/unit-tests/cond-token-plain.exp | 30 ++--
usr.bin/make/unit-tests/cond-token-plain.mk | 13 ++-
usr.bin/make/unit-tests/cond-token-string.exp | 20 +-
usr.bin/make/unit-tests/cond-token-string.mk | 12 +-
usr.bin/make/unit-tests/cond-token-var.exp | 8 +-
usr.bin/make/unit-tests/cond-token-var.mk | 8 +-
usr.bin/make/unit-tests/cond-undef-lint.exp | 14 +-
usr.bin/make/unit-tests/cond-undef-lint.mk | 9 +-
usr.bin/make/unit-tests/dep-colon-bug-cross-file.exp | 4 +-
usr.bin/make/unit-tests/dep-colon-bug-cross-file.mk | 4 +-
usr.bin/make/unit-tests/deptgt-begin.exp | 4 +-
usr.bin/make/unit-tests/deptgt-begin.mk | 4 +-
usr.bin/make/unit-tests/deptgt-delete_on_error.mk | 2 +-
usr.bin/make/unit-tests/deptgt.exp | 22 +-
usr.bin/make/unit-tests/deptgt.mk | 5 +-
usr.bin/make/unit-tests/directive-elif.exp | 36 +++---
usr.bin/make/unit-tests/directive-elif.mk | 25 +++-
usr.bin/make/unit-tests/directive-else.exp | 14 +-
usr.bin/make/unit-tests/directive-else.mk | 12 +-
usr.bin/make/unit-tests/directive-endfor.exp | 2 +-
usr.bin/make/unit-tests/directive-endfor.mk | 3 +-
usr.bin/make/unit-tests/directive-endif.exp | 10 +-
usr.bin/make/unit-tests/directive-endif.mk | 4 +-
usr.bin/make/unit-tests/directive-error.exp | 2 +-
usr.bin/make/unit-tests/directive-error.mk | 3 +-
usr.bin/make/unit-tests/directive-for-break.exp | 4 +-
usr.bin/make/unit-tests/directive-for-break.mk | 4 +-
usr.bin/make/unit-tests/directive-for-empty.exp | 8 +-
usr.bin/make/unit-tests/directive-for-empty.mk | 6 +-
usr.bin/make/unit-tests/directive-for-errors.exp | 28 ++--
usr.bin/make/unit-tests/directive-for-errors.mk | 4 +-
usr.bin/make/unit-tests/directive-for-escape.exp | 72 ++++++------
usr.bin/make/unit-tests/directive-for-escape.mk | 4 +-
usr.bin/make/unit-tests/directive-for-generating-endif.exp | 8 +-
usr.bin/make/unit-tests/directive-for-generating-endif.mk | 6 +-
usr.bin/make/unit-tests/directive-for-if.exp | 6 +-
usr.bin/make/unit-tests/directive-for-if.mk | 5 +-
usr.bin/make/unit-tests/directive-for-lines.exp | 12 +-
usr.bin/make/unit-tests/directive-for-lines.mk | 8 +-
usr.bin/make/unit-tests/directive-for.exp | 56 ++++----
usr.bin/make/unit-tests/directive-for.mk | 4 +-
usr.bin/make/unit-tests/directive-if.exp | 28 ++--
usr.bin/make/unit-tests/directive-if.mk | 10 +-
usr.bin/make/unit-tests/directive-ifmake.exp | 14 +-
usr.bin/make/unit-tests/directive-ifmake.mk | 9 +-
usr.bin/make/unit-tests/directive-ifndef.exp | 2 +-
usr.bin/make/unit-tests/directive-ifndef.mk | 3 +-
usr.bin/make/unit-tests/directive-include-fatal.exp | 2 +-
usr.bin/make/unit-tests/directive-include-fatal.mk | 3 +-
usr.bin/make/unit-tests/directive-include.exp | 12 +-
usr.bin/make/unit-tests/directive-include.mk | 6 +-
usr.bin/make/unit-tests/directive-info.exp | 24 ++--
usr.bin/make/unit-tests/directive-info.mk | 19 ++-
usr.bin/make/unit-tests/directive-misspellings.exp | 84 +++++++-------
usr.bin/make/unit-tests/directive-misspellings.mk | 46 +++++++-
usr.bin/make/unit-tests/directive-undef.exp | 6 +-
usr.bin/make/unit-tests/directive-undef.mk | 5 +-
usr.bin/make/unit-tests/directive-unexport-env.exp | 6 +-
usr.bin/make/unit-tests/directive-unexport-env.mk | 5 +-
usr.bin/make/unit-tests/directive-unexport.exp | 8 +-
usr.bin/make/unit-tests/directive-unexport.mk | 5 +-
usr.bin/make/unit-tests/directive-warning.exp | 14 +-
usr.bin/make/unit-tests/directive-warning.mk | 9 +-
usr.bin/make/unit-tests/doterror.mk | 3 +-
usr.bin/make/unit-tests/error.exp | 6 +-
usr.bin/make/unit-tests/error.mk | 5 +-
usr.bin/make/unit-tests/export-env.mk | 6 +-
usr.bin/make/unit-tests/include-main.exp | 10 +-
usr.bin/make/unit-tests/include-main.mk | 6 +-
usr.bin/make/unit-tests/opt-debug-file.exp | 6 +-
usr.bin/make/unit-tests/opt-debug-file.mk | 5 +-
usr.bin/make/unit-tests/opt-debug-hash.exp | 2 +-
usr.bin/make/unit-tests/opt-debug-hash.mk | 3 +-
usr.bin/make/unit-tests/opt-debug-lint.exp | 14 +-
usr.bin/make/unit-tests/opt-debug-lint.mk | 9 +-
usr.bin/make/unit-tests/opt-debug-parse.exp | 28 ++--
usr.bin/make/unit-tests/opt-debug-parse.mk | 5 +-
usr.bin/make/unit-tests/opt-warnings-as-errors.exp | 4 +-
usr.bin/make/unit-tests/opt-warnings-as-errors.mk | 4 +-
usr.bin/make/unit-tests/parse.exp | 2 +-
usr.bin/make/unit-tests/parse.mk | 3 +-
usr.bin/make/unit-tests/recursive.exp | 4 +-
usr.bin/make/unit-tests/recursive.mk | 4 +-
usr.bin/make/unit-tests/var-eval-short.exp | 8 +-
usr.bin/make/unit-tests/var-eval-short.mk | 4 +-
usr.bin/make/unit-tests/var-op-assign.exp | 4 +-
usr.bin/make/unit-tests/var-op-assign.mk | 4 +-
usr.bin/make/unit-tests/var-op-expand.exp | 6 +-
usr.bin/make/unit-tests/var-op-expand.mk | 4 +-
usr.bin/make/unit-tests/var-op-shell.exp | 8 +-
usr.bin/make/unit-tests/var-op-shell.mk | 6 +-
usr.bin/make/unit-tests/var-readonly.mk | 3 +-
usr.bin/make/unit-tests/var-recursive.exp | 12 +-
usr.bin/make/unit-tests/var-recursive.mk | 4 +-
usr.bin/make/unit-tests/var-scope-cmdline.exp | 4 +-
usr.bin/make/unit-tests/var-scope-cmdline.mk | 4 +-
usr.bin/make/unit-tests/vardebug.exp | 6 +-
usr.bin/make/unit-tests/vardebug.mk | 5 +-
usr.bin/make/unit-tests/varmod-assign-shell.exp | 2 +-
usr.bin/make/unit-tests/varmod-assign-shell.mk | 3 +-
usr.bin/make/unit-tests/varmod-edge.exp | 42 +++---
usr.bin/make/unit-tests/varmod-edge.mk | 23 +++-
usr.bin/make/unit-tests/varmod-gmtime.exp | 20 +-
usr.bin/make/unit-tests/varmod-gmtime.mk | 12 +-
usr.bin/make/unit-tests/varmod-ifelse.exp | 24 ++--
usr.bin/make/unit-tests/varmod-ifelse.mk | 13 ++-
usr.bin/make/unit-tests/varmod-indirect.exp | 32 ++--
usr.bin/make/unit-tests/varmod-indirect.mk | 13 ++-
usr.bin/make/unit-tests/varmod-localtime.exp | 20 +-
usr.bin/make/unit-tests/varmod-localtime.mk | 12 +-
usr.bin/make/unit-tests/varmod-loop-delete.exp | 2 +-
usr.bin/make/unit-tests/varmod-loop-delete.mk | 3 +-
usr.bin/make/unit-tests/varmod-loop-varname.exp | 16 +-
usr.bin/make/unit-tests/varmod-loop-varname.mk | 10 +-
usr.bin/make/unit-tests/varmod-match-escape.exp | 4 +-
usr.bin/make/unit-tests/varmod-match-escape.mk | 4 +-
usr.bin/make/unit-tests/varmod-order.exp | 20 +-
usr.bin/make/unit-tests/varmod-order.mk | 13 ++-
usr.bin/make/unit-tests/varmod-range.exp | 20 +-
usr.bin/make/unit-tests/varmod-range.mk | 12 +-
usr.bin/make/unit-tests/varmod-subst.mk | 4 +-
usr.bin/make/unit-tests/varmod-sysv.exp | 2 +-
usr.bin/make/unit-tests/varmod-sysv.mk | 3 +-
usr.bin/make/unit-tests/varmod-to-abs.exp | 4 +-
usr.bin/make/unit-tests/varmod-to-abs.mk | 5 +-
usr.bin/make/unit-tests/varmod-to-separator.exp | 28 ++--
usr.bin/make/unit-tests/varmod-to-separator.mk | 14 ++-
usr.bin/make/unit-tests/varmod.exp | 10 +-
usr.bin/make/unit-tests/varmod.mk | 7 +-
usr.bin/make/unit-tests/varname-dollar.exp | 8 +-
usr.bin/make/unit-tests/varname-dollar.mk | 6 +-
usr.bin/make/unit-tests/varname-dot-makeflags.exp | 12 +-
usr.bin/make/unit-tests/varname-dot-makeflags.mk | 5 +-
usr.bin/make/unit-tests/varname-dot-parsedir.exp | 6 +-
usr.bin/make/unit-tests/varname-dot-parsedir.mk | 4 +-
usr.bin/make/unit-tests/varname-dot-parsefile.exp | 6 +-
usr.bin/make/unit-tests/varname-dot-parsefile.mk | 4 +-
usr.bin/make/unit-tests/varname.exp | 6 +-
usr.bin/make/unit-tests/varname.mk | 5 +-
usr.bin/make/unit-tests/varparse-dynamic.exp | 4 +-
usr.bin/make/unit-tests/varparse-dynamic.mk | 7 +-
usr.bin/make/unit-tests/varparse-errors.exp | 8 +-
usr.bin/make/unit-tests/varparse-errors.mk | 6 +-
174 files changed, 1087 insertions(+), 720 deletions(-)
diffs (truncated from 5053 to 300 lines):
diff -r 37d76b1992e3 -r f8aae8355f2e usr.bin/make/unit-tests/check-expect.lua
--- a/usr.bin/make/unit-tests/check-expect.lua Thu Jun 01 20:50:18 2023 +0000
+++ b/usr.bin/make/unit-tests/check-expect.lua Thu Jun 01 20:56:35 2023 +0000
@@ -1,5 +1,5 @@
#! /usr/bin/lua
--- $NetBSD: check-expect.lua,v 1.5 2023/06/01 07:27:30 rillig Exp $
+-- $NetBSD: check-expect.lua,v 1.6 2023/06/01 20:56:35 rillig Exp $
--[[
@@ -19,10 +19,6 @@ expected text in the corresponding .exp
# expect[+-]offset: <message>
Each message must occur in the .exp file and refer back to the
source line in the .mk file.
-
-# expect-all
- Each message from the .exp file that can be matched by an
- 'expect[+-]offset' comment must actually be matched.
]]
@@ -79,7 +75,6 @@ local function check_mk(mk_fname)
if exp_lines == nil then return end
local by_location = collect_lineno_diagnostics(exp_lines)
local prev_expect_line = 0
- local match_all = false
for mk_lineno, mk_line in ipairs(mk_lines) do
for text in mk_line:gmatch("#%s*expect:%s*(.*)") do
@@ -122,20 +117,13 @@ local function check_mk(mk_fname)
mk_fname, mk_lineno, exp_fname, text)
end
end
-
- if mk_line:match("^#%s*expect%-all$") then
- match_all = true
- end
end
- if match_all then
- -- XXX: The messages are not sorted in any meaningful way.
- for location, messages in pairs(by_location) do
- for _, message in ipairs(messages) do
- if message ~= "" then
- print_error("error: %s: missing 'expect' comment for '%s'",
- location, message)
- end
+ -- XXX: The messages are not sorted in any meaningful way.
+ for location, messages in pairs(by_location) do
+ for _, message in ipairs(messages) do
+ if message ~= "" and location:find(".mk:") then
+ print_error("missing: %s: # expect+1: %s", location, message)
end
end
end
diff -r 37d76b1992e3 -r f8aae8355f2e usr.bin/make/unit-tests/cmdline-undefined.exp
--- a/usr.bin/make/unit-tests/cmdline-undefined.exp Thu Jun 01 20:50:18 2023 +0000
+++ b/usr.bin/make/unit-tests/cmdline-undefined.exp Thu Jun 01 20:56:35 2023 +0000
@@ -1,17 +1,17 @@
The = assignment operator
-make: "cmdline-undefined.mk" line 29: From the command line: Undefined is .
-make: "cmdline-undefined.mk" line 30: From .MAKEFLAGS '=': Undefined is .
-make: "cmdline-undefined.mk" line 31: From .MAKEFLAGS ':=': Undefined is .
-make: "cmdline-undefined.mk" line 35: From the command line: Undefined is now defined.
-make: "cmdline-undefined.mk" line 36: From .MAKEFLAGS '=': Undefined is now defined.
-make: "cmdline-undefined.mk" line 37: From .MAKEFLAGS ':=': Undefined is now defined.
+make: "cmdline-undefined.mk" line 31: From the command line: Undefined is .
+make: "cmdline-undefined.mk" line 34: From .MAKEFLAGS '=': Undefined is .
+make: "cmdline-undefined.mk" line 37: From .MAKEFLAGS ':=': Undefined is .
+make: "cmdline-undefined.mk" line 43: From the command line: Undefined is now defined.
+make: "cmdline-undefined.mk" line 46: From .MAKEFLAGS '=': Undefined is now defined.
+make: "cmdline-undefined.mk" line 49: From .MAKEFLAGS ':=': Undefined is now defined.
The := assignment operator
-make: "cmdline-undefined.mk" line 29: From the command line: Undefined is .
-make: "cmdline-undefined.mk" line 30: From .MAKEFLAGS '=': Undefined is .
-make: "cmdline-undefined.mk" line 31: From .MAKEFLAGS ':=': Undefined is .
-make: "cmdline-undefined.mk" line 35: From the command line: Undefined is now defined.
-make: "cmdline-undefined.mk" line 36: From .MAKEFLAGS '=': Undefined is now defined.
-make: "cmdline-undefined.mk" line 37: From .MAKEFLAGS ':=': Undefined is now defined.
+make: "cmdline-undefined.mk" line 31: From the command line: Undefined is .
+make: "cmdline-undefined.mk" line 34: From .MAKEFLAGS '=': Undefined is .
+make: "cmdline-undefined.mk" line 37: From .MAKEFLAGS ':=': Undefined is .
+make: "cmdline-undefined.mk" line 43: From the command line: Undefined is now defined.
+make: "cmdline-undefined.mk" line 46: From .MAKEFLAGS '=': Undefined is now defined.
+make: "cmdline-undefined.mk" line 49: From .MAKEFLAGS ':=': Undefined is now defined.
exit status 0
diff -r 37d76b1992e3 -r f8aae8355f2e usr.bin/make/unit-tests/cmdline-undefined.mk
--- a/usr.bin/make/unit-tests/cmdline-undefined.mk Thu Jun 01 20:50:18 2023 +0000
+++ b/usr.bin/make/unit-tests/cmdline-undefined.mk Thu Jun 01 20:56:35 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: cmdline-undefined.mk,v 1.2 2020/11/04 04:49:33 rillig Exp $
+# $NetBSD: cmdline-undefined.mk,v 1.3 2023/06/01 20:56:35 rillig Exp $
#
# Tests for undefined variable expressions in the command line.
@@ -26,14 +26,26 @@ all:
.MAKEFLAGS: MAKEFLAGS_ASSIGN='Undefined is $${UNDEFINED}.'
.MAKEFLAGS: MAKEFLAGS_SUBST:='Undefined is $${UNDEFINED}.'
+# expect+2: From the command line: Undefined is .
+# expect+1: From the command line: Undefined is .
.info From the command line: ${CMDLINE}
+# expect+2: From .MAKEFLAGS '=': Undefined is .
+# expect+1: From .MAKEFLAGS '=': Undefined is .
.info From .MAKEFLAGS '=': ${MAKEFLAGS_ASSIGN}
+# expect+2: From .MAKEFLAGS ':=': Undefined is .
+# expect+1: From .MAKEFLAGS ':=': Undefined is .
.info From .MAKEFLAGS ':=': ${MAKEFLAGS_SUBST}
UNDEFINED?= now defined
+# expect+2: From the command line: Undefined is now defined.
+# expect+1: From the command line: Undefined is now defined.
.info From the command line: ${CMDLINE}
+# expect+2: From .MAKEFLAGS '=': Undefined is now defined.
+# expect+1: From .MAKEFLAGS '=': Undefined is now defined.
.info From .MAKEFLAGS '=': ${MAKEFLAGS_ASSIGN}
+# expect+2: From .MAKEFLAGS ':=': Undefined is now defined.
+# expect+1: From .MAKEFLAGS ':=': Undefined is now defined.
.info From .MAKEFLAGS ':=': ${MAKEFLAGS_SUBST}
print-undefined:
diff -r 37d76b1992e3 -r f8aae8355f2e usr.bin/make/unit-tests/cond-cmp-numeric-eq.exp
--- a/usr.bin/make/unit-tests/cond-cmp-numeric-eq.exp Thu Jun 01 20:50:18 2023 +0000
+++ b/usr.bin/make/unit-tests/cond-cmp-numeric-eq.exp Thu Jun 01 20:56:35 2023 +0000
@@ -1,5 +1,5 @@
-make: "cond-cmp-numeric-eq.mk" line 67: Malformed conditional (!(12345 = 12345))
-make: "cond-cmp-numeric-eq.mk" line 74: Malformed conditional (!(12345 === 12345))
+make: "cond-cmp-numeric-eq.mk" line 68: Malformed conditional (!(12345 = 12345))
+make: "cond-cmp-numeric-eq.mk" line 76: Malformed conditional (!(12345 === 12345))
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff -r 37d76b1992e3 -r f8aae8355f2e usr.bin/make/unit-tests/cond-cmp-numeric-eq.mk
--- a/usr.bin/make/unit-tests/cond-cmp-numeric-eq.mk Thu Jun 01 20:50:18 2023 +0000
+++ b/usr.bin/make/unit-tests/cond-cmp-numeric-eq.mk Thu Jun 01 20:56:35 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: cond-cmp-numeric-eq.mk,v 1.5 2020/11/08 21:47:59 rillig Exp $
+# $NetBSD: cond-cmp-numeric-eq.mk,v 1.6 2023/06/01 20:56:35 rillig Exp $
#
# Tests for numeric comparisons with the == operator in .if conditions.
@@ -64,6 +64,7 @@
.endif
# There is no = operator for numbers.
+# expect+1: Malformed conditional (!(12345 = 12345))
.if !(12345 = 12345)
. error
.else
@@ -71,6 +72,7 @@
.endif
# There is no === operator for numbers either.
+# expect+1: Malformed conditional (!(12345 === 12345))
.if !(12345 === 12345)
. error
.else
diff -r 37d76b1992e3 -r f8aae8355f2e usr.bin/make/unit-tests/cond-cmp-unary.exp
--- a/usr.bin/make/unit-tests/cond-cmp-unary.exp Thu Jun 01 20:50:18 2023 +0000
+++ b/usr.bin/make/unit-tests/cond-cmp-unary.exp Thu Jun 01 20:56:35 2023 +0000
@@ -1,2 +1,2 @@
-make: "cond-cmp-unary.mk" line 53: This is only reached because of a bug in EvalTruthy.
+make: "cond-cmp-unary.mk" line 54: This is only reached because of a bug in EvalTruthy.
exit status 0
diff -r 37d76b1992e3 -r f8aae8355f2e usr.bin/make/unit-tests/cond-cmp-unary.mk
--- a/usr.bin/make/unit-tests/cond-cmp-unary.mk Thu Jun 01 20:50:18 2023 +0000
+++ b/usr.bin/make/unit-tests/cond-cmp-unary.mk Thu Jun 01 20:56:35 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: cond-cmp-unary.mk,v 1.4 2023/06/01 07:44:10 rillig Exp $
+# $NetBSD: cond-cmp-unary.mk,v 1.5 2023/06/01 20:56:35 rillig Exp $
#
# Tests for unary comparisons in .if conditions, that is, comparisons with
# a single operand. If the operand is a number, it is compared to zero,
@@ -50,6 +50,7 @@
# a commit from 1992-04-15 saying "A variable is empty when it just contains
# spaces".
.if ${:U }
+# expect+1: This is only reached because of a bug in EvalTruthy.
. info This is only reached because of a bug in EvalTruthy.
.else
. error
diff -r 37d76b1992e3 -r f8aae8355f2e usr.bin/make/unit-tests/cond-eof.exp
--- a/usr.bin/make/unit-tests/cond-eof.exp Thu Jun 01 20:50:18 2023 +0000
+++ b/usr.bin/make/unit-tests/cond-eof.exp Thu Jun 01 20:56:35 2023 +0000
@@ -1,6 +1,6 @@
-make: "cond-eof.mk" line 19: Malformed conditional (0 ${SIDE_EFFECT} ${SIDE_EFFECT2})
-make: "cond-eof.mk" line 22: Malformed conditional (1 ${SIDE_EFFECT} ${SIDE_EFFECT2})
-make: "cond-eof.mk" line 25: Malformed conditional ((0) ${SIDE_EFFECT} ${SIDE_EFFECT2})
+make: "cond-eof.mk" line 17: Malformed conditional (0 ${SIDE_EFFECT} ${SIDE_EFFECT2})
+make: "cond-eof.mk" line 20: Malformed conditional (1 ${SIDE_EFFECT} ${SIDE_EFFECT2})
+make: "cond-eof.mk" line 23: Malformed conditional ((0) ${SIDE_EFFECT} ${SIDE_EFFECT2})
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff -r 37d76b1992e3 -r f8aae8355f2e usr.bin/make/unit-tests/cond-eof.mk
--- a/usr.bin/make/unit-tests/cond-eof.mk Thu Jun 01 20:50:18 2023 +0000
+++ b/usr.bin/make/unit-tests/cond-eof.mk Thu Jun 01 20:56:35 2023 +0000
@@ -1,10 +1,8 @@
-# $NetBSD: cond-eof.mk,v 1.4 2023/06/01 07:27:30 rillig Exp $
+# $NetBSD: cond-eof.mk,v 1.5 2023/06/01 20:56:35 rillig Exp $
#
# Tests for parsing the end of '.if' conditions, which are represented as the
# token TOK_EOF.
-# expect-all
-
SIDE_EFFECT= ${:!echo 'side effect' 1>&2!}
SIDE_EFFECT2= ${:!echo 'side effect 2' 1>&2!}
diff -r 37d76b1992e3 -r f8aae8355f2e usr.bin/make/unit-tests/cond-func-defined.exp
--- a/usr.bin/make/unit-tests/cond-func-defined.exp Thu Jun 01 20:50:18 2023 +0000
+++ b/usr.bin/make/unit-tests/cond-func-defined.exp Thu Jun 01 20:56:35 2023 +0000
@@ -1,8 +1,8 @@
-make: "cond-func-defined.mk" line 23: Missing closing parenthesis for defined()
-make: "cond-func-defined.mk" line 33: Missing closing parenthesis for defined()
-make: "cond-func-defined.mk" line 45: In .for loops, variable expressions for the loop variables are
-make: "cond-func-defined.mk" line 46: substituted at evaluation time. There is no actual variable
-make: "cond-func-defined.mk" line 47: involved, even if it feels like it.
+make: "cond-func-defined.mk" line 24: Missing closing parenthesis for defined()
+make: "cond-func-defined.mk" line 34: Missing closing parenthesis for defined()
+make: "cond-func-defined.mk" line 47: In .for loops, variable expressions for the loop variables are
+make: "cond-func-defined.mk" line 49: substituted at evaluation time. There is no actual variable
+make: "cond-func-defined.mk" line 51: involved, even if it feels like it.
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff -r 37d76b1992e3 -r f8aae8355f2e usr.bin/make/unit-tests/cond-func-defined.mk
--- a/usr.bin/make/unit-tests/cond-func-defined.mk Thu Jun 01 20:50:18 2023 +0000
+++ b/usr.bin/make/unit-tests/cond-func-defined.mk Thu Jun 01 20:56:35 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: cond-func-defined.mk,v 1.9 2022/05/08 06:51:27 rillig Exp $
+# $NetBSD: cond-func-defined.mk,v 1.10 2023/06/01 20:56:35 rillig Exp $
#
# Tests for the defined() function in .if conditions.
@@ -20,6 +20,7 @@ DEF= defined
.endif
# The argument of a function must not directly contain whitespace.
+# expect+1: Missing closing parenthesis for defined()
.if !defined(A B)
. error
.endif
@@ -29,7 +30,7 @@ DEF= defined
. error
.endif
-# Parse error: missing closing parenthesis; see ParseWord.
+# expect+1: Missing closing parenthesis for defined()
.if defined(DEF
. error
.else
@@ -42,8 +43,11 @@ DEF= defined
. if defined(var)
. error
. else
+# expect+1: In .for loops, variable expressions for the loop variables are
. info In .for loops, variable expressions for the loop variables are
+# expect+1: substituted at evaluation time. There is no actual variable
. info substituted at evaluation time. There is no actual variable
+# expect+1: involved, even if it feels like it.
. info involved, even if it feels like it.
. endif
.endfor
diff -r 37d76b1992e3 -r f8aae8355f2e usr.bin/make/unit-tests/cond-func-empty.exp
--- a/usr.bin/make/unit-tests/cond-func-empty.exp Thu Jun 01 20:50:18 2023 +0000
+++ b/usr.bin/make/unit-tests/cond-func-empty.exp Thu Jun 01 20:56:35 2023 +0000
@@ -1,5 +1,5 @@
-make: "cond-func-empty.mk" line 153: Unclosed variable "WORD"
-make: "cond-func-empty.mk" line 153: Malformed conditional (empty(WORD)
+make: "cond-func-empty.mk" line 154: Unclosed variable "WORD"
+make: "cond-func-empty.mk" line 154: Malformed conditional (empty(WORD)
make: Fatal errors encountered -- cannot continue
make: stopped in unit-tests
exit status 1
diff -r 37d76b1992e3 -r f8aae8355f2e usr.bin/make/unit-tests/cond-func-empty.mk
--- a/usr.bin/make/unit-tests/cond-func-empty.mk Thu Jun 01 20:50:18 2023 +0000
+++ b/usr.bin/make/unit-tests/cond-func-empty.mk Thu Jun 01 20:56:35 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: cond-func-empty.mk,v 1.19 2023/06/01 07:27:30 rillig Exp $
+# $NetBSD: cond-func-empty.mk,v 1.20 2023/06/01 20:56:35 rillig Exp $
#
# Tests for the empty() function in .if conditions, which tests a variable
# expression for emptiness.
@@ -149,7 +149,8 @@ WORD= word
. error
.endif
-# Parse error: missing closing parenthesis.
+# expect+2: Unclosed variable "WORD"
+# expect+1: Malformed conditional (empty(WORD)
.if empty(WORD
. error
.else
diff -r 37d76b1992e3 -r f8aae8355f2e usr.bin/make/unit-tests/cond-func.exp
--- a/usr.bin/make/unit-tests/cond-func.exp Thu Jun 01 20:50:18 2023 +0000
+++ b/usr.bin/make/unit-tests/cond-func.exp Thu Jun 01 20:56:35 2023 +0000
Home |
Main Index |
Thread Index |
Old Index