Home | History | Annotate | Download | only in unit-tests
History log of /src/usr.bin/make/unit-tests/cond-token-var.mk
RevisionDateAuthorComments
 1.14  28-Jun-2025  rillig make: consistently use double quotes in error messages

Previously, some error messages used single quotes, very few used
backticks or parentheses, most already used double quotes.

While here, reword a few error messages to be clearer or more consistent
with related error messages.
 1.13  04-Apr-2025  rillig make: fix error message for undefined variable in conditional

Previously, only ${UNDEF} had the proper error message, while
${UNDEF:M*} still produced the wrong "Malformed conditional".
 1.12  04-Apr-2025  rillig tests/make: demonstrate wrong error message for undefined variable

Found by wiz in pkgsrc/x11/gtk3.
 1.11  11-Jan-2025  rillig make: replace "Malformed conditional" with "Variable is undefined"

Evaluating a conditional such as ".if ${UNDEF}" produced a "Malformed
conditional" error, even though the form of the conditional was correct,
it was the content of the variable that was wrong.

Replace this message with the more accurate "Variable is undefined",
revealing which of the possibly many variables is actually undefined.
 1.10  10-Jan-2025  rillig tests/make: test expressions based on undefined variables

When an undefined variable is used in a conditional, make complains about
"Malformed conditional", which is wrong since the conditional is
well-formed but errors out during evaluation.

In order to fix this wrong error message and preserve the remaining
behavior, cover the places in which an expression is evaluated with
undefined expressions being an error (VARE_EVAL_DEFINED), but with
neither producing an error message nor handling errors. This combination
results in the same behavior as evaluating the expressions in the mode
that allows undefined variables to be used in expressions.
 1.9  06-Aug-2024  rillig make: in error message about conditionals, use single quotes

Single quotes are used less often in the conditionals themselves, which
leads to fewer confusions.
 1.8  19-Nov-2023  rillig tests/make: replace 'variable expression' with 'expression'

Each expression is based on a variable, there's no need for the
verbosity. The wording in make's diagnostics will be changed in a
follow-up commit.
 1.7  01-Jun-2023  rillig 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.
 1.6  25-Apr-2021  rillig tests/make: add tests for ${...} without operator in conditions

These tests are already covered in cond-cmp-unary.mk, but my first guess
was to search for these tests in cond-token-var.mk, so keep them in both
tests.
 1.5  15-Nov-2020  rillig make(1): add remarks to the tests about conditions
 1.4  24-Oct-2020  rillig make(1): indent directives like .info, .if, .for consistently

Done by "pkglint -F *.mk", no manual corrections.
 1.3  20-Aug-2020  rillig make(1): add test for variable expressions in conditions
 1.2  16-Aug-2020  rillig make(1): describe the purpose of each newly added unit test dummy
 1.1  16-Aug-2020  rillig make(1): add dummies for fine-grained tests, one per single feature

The test names have been derived from the current manual page.

All these tests are dummies right now, and the code from the existing
tests will be moved into the new tests step by step.

This is done to prevent modmisc, escape, varmod-edge and varmisc from
growing without any bounds, and to reduce the side-effects of one test
to the others.

RSS XML Feed