| History log of /src/usr.bin/make/unit-tests/directive-for-escape.exp |
| Revision | | Date | Author | Comments |
| 1.35 |
| 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.34 |
| 11-Apr-2025 |
rillig | make: convert more messages to the "file:123" format
|
| 1.33 |
| 30-Mar-2025 |
rillig | make: use '"filename" line 123' for locations instead of 'filename:123'
The format 'filename:123' is commonly used for identifying a location in a file. Text editors recognize it and allow quick navigation through it. The previous format was specific to make and would have required custom support in editors.
The new format was already used in stack traces, except for the first line. Now all lines use the same format.
|
| 1.32 |
| 31-Oct-2024 |
rillig | make: in the debug log, always qualify line number with filename
Previously, to find out the filename corresponding to a line number from a 'Parsing' line, it was necessary to find the preceding 'SetFilenameVars' line, which was unnecessarily time-consuming and distracting.
The 'filename:line' format matches the one used in PrintStackTrace, and it differs from the one used in PrintLocation, as the former format is more common in other tools.
Most of the affected unit tests only use the 'Parsing' lines to give additional context to their debug log, so no structural changes there.
|
| 1.31 |
| 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.30 |
| 07-Jul-2024 |
rillig | tests/make: remove '# expect' lines from .exp file
These lines are only supposed to occur in .mk files.
|
| 1.29 |
| 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.28 |
| 05-Jul-2024 |
rillig | make: in error messages for anonymous variables, log the value
|
| 1.27 |
| 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.26 |
| 05-Jul-2024 |
rillig | tests/make: add expected messages for "Unclosed expression"
|
| 1.25 |
| 04-Jul-2024 |
rillig | make: add more context information to error messages
In case of a parse error or evaluation error, print the variable value in addition to the variable name, to see the effects of previous expression modifiers.
In nested make calls, print the current directory at the bottom of a stack trace, as that information is otherwise hard to get in a parallel build spanning multiple directories.
|
| 1.24 |
| 14-Apr-2024 |
rillig | branches: 1.24.2; make: add debug logging for .if and .for lines in -dp mode
This helps track down in which line a condition is evaluated.
|
| 1.23 |
| 19-Nov-2023 |
rillig | make: replace 'variable expression' with 'expression' in diagnostics
|
| 1.22 |
| 23-Jun-2023 |
rillig | tests/make: explain and extend tests for expansion in .for loops
|
| 1.21 |
| 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.20 |
| 01-Jun-2023 |
rillig | make: add more details to debug logging of .for loops
|
| 1.19 |
| 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.18 |
| 08-May-2023 |
rillig | make: disallow characters like '$' in variable names in .for loops
Fixes PR 53146.
|
| 1.17 |
| 12-Jun-2022 |
rillig | make: document ExprLen, which is part of a .for loop
No binary change
|
| 1.16 |
| 27-Jan-2022 |
rillig | tests/make: add more edge cases for expansion of .for loop body
|
| 1.15 |
| 27-Jan-2022 |
rillig | tests/make: explain escaping in .for loops, add more test cases
|
| 1.14 |
| 09-Jan-2022 |
rillig | tests/make: add placeholders for .PARSEDIR and .INCLUDEDFROMDIR
When run via 'cd usr.bin/make/unit-tests && make test', the tests are in the current directory. When run via ATF, the tests are in /usr/tests/usr.bin/make/unit-tests, while the current directory is a temporary directory. Allow both variants, plus others that may occur in the bmake distribution.
|
| 1.13 |
| 09-Jan-2022 |
rillig | make: fix crash for newline in .for value in -dp mode (since yesterday)
|
| 1.12 |
| 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.11 |
| 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.10 |
| 25-Jun-2021 |
rillig | tests/make: demonstrate newline injection in .for loop
|
| 1.9 |
| 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.8 |
| 23-Feb-2021 |
rillig | make: improve error message for unclosed modifier
Replace "variable specification" with the more modern "variable expression", reduce the number of parentheses, output more than a single character for modifiers, make it obvious that in expressions such as ${:Serror}, the "" means a variable name.
|
| 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.24.2.1 |
| 02-Aug-2025 |
perseant | Sync with HEAD
|