Home | History | Annotate | Download | only in unit-tests
History log of /src/usr.bin/make/unit-tests/directive-for-escape.mk
RevisionDateAuthorComments
 1.30  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.29  29-Aug-2024  rillig make: reduce line length in error messages

The error messages for deeply nested parse errors were hard to decipher,
due to the large amount of text. Split these messages into individual
lines, just as in the backtrace for .include files and .for loops. This
unified backtrace makes the output more uniform.
 1.28  07-Jul-2024  rillig tests/make: remove '# expect' lines from .exp file

These lines are only supposed to occur in .mk files.
 1.27  06-Jul-2024  rillig tests/make: clean up tests

Prefer "expect+X" directives to be above the code generating them,
instead of "expect-X" directives below the code.

In varmod-edge.mk, separate the tests, as the common loop does not pull
its weight.
 1.26  05-Jul-2024  rillig make: in error messages for anonymous variables, log the value
 1.25  05-Jul-2024  rillig make: error out on unclosed expressions during parse time

In exchange, this adds location information.

For unnamed expressions, the value is no longer printed. This will be
added back in a follow-up commit.
 1.24  05-Jul-2024  rillig tests/make: add expected messages for "Unclosed expression"
 1.23  19-Nov-2023  rillig branches: 1.23.2;
tests/make: replace 'variable expressions' with 'expressions'
 1.22  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.21  23-Jun-2023  rillig tests/make: explain and extend tests for expansion in .for loops
 1.20  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.19  01-Jun-2023  rillig make: add more details to debug logging of .for loops
 1.18  09-May-2023  rillig make: skip syntactically wrong .for loops

When a .for loop cannot be interpreted correctly, for example when there
are no iteration variables or the number of words doesn't match the
iteration variables, skip the body of the .for loop instead of
interpreting it once.
 1.17  08-May-2023  rillig make: disallow characters like '$' in variable names in .for loops

Fixes PR 53146.
 1.16  12-Jun-2022  rillig make: document ExprLen, which is part of a .for loop

No binary change
 1.15  27-Jan-2022  rillig tests/make: add more edge cases for expansion of .for loop body
 1.14  27-Jan-2022  rillig tests/make: explain escaping in .for loops, add more test cases
 1.13  09-Jan-2022  rillig make: fix crash for newline in .for value in -dp mode (since yesterday)
 1.12  05-Dec-2021  rillig make: inline Str_Words into .for loop handling

This saves one memory allocation and a bit of copying, per .for loop.

No functional change.
 1.11  02-Sep-2021  rillig make: rename for_var_len to ExprLen

The text ${VAR} is not a variable, it's a variable expression.

No functional change.
 1.10  25-Jun-2021  rillig make: prevent newline injection in .for loops

When a value of a .for loop contained a literal newline, such as from
the expression ${.newline}, that newline was passed verbatim to the
"expanded current body" of the .for loop. There it was interpreted as a
literal newline, which ended the current line and started a new one.
This resulted in several syntax errors.

In cases like these, print a more precise error message.
 1.9  25-Jun-2021  rillig tests/make: demonstrate newline injection in .for loop
 1.8  24-Jun-2021  rillig tests/make: test .for loop over a variable named '$'

It's an impractical edge case, nevertheless it's accepted by make.
 1.7  15-Feb-2021  rillig make: improve comments in test for expansions in .for loops
 1.6  25-Jan-2021  rillig make(1): rename struct For to struct ForLoop

This removes the ambiguity whether For_Free is meant to be a
module-exported function or a local function associate with that struct.
Rename the affected functions as well.
 1.5  24-Jan-2021  rillig make(1): describe expansion of nested variables in .for values

These edge cases are not documented anywhere, and their behavior is
non-intuitive. For now, just describe them, don't try to fix them.
There may be people out there relying on exactly this behavior.
 1.4  24-Jan-2021  rillig make(1): let the test directive-for-escape exit successfully

There is no reason for a non-zero exit status here.
 1.3  31-Dec-2020  rillig make(1): add test for common and edge cases in .for loop expansion
 1.2  31-Dec-2020  rillig make(1): add tests for extreme edge cases of .for loop expansion
 1.1  31-Dec-2020  rillig make(1): add test for error handling and expansion in .for loops
 1.23.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed