History log of /src/usr.bin/make/unit-tests/cmdline-undefined.exp |
Revision | | Date | Author | Comments |
1.5 |
| 30-Jun-2025 |
rillig | tests/make: force expected lines to be listed in execution order
The diagnostics from the program to check the "expect" lines in the unit test files were hard to follow since the "out-of-order" lines were confusing. For out-of-order lines, state where they should be placed instead.
|
1.4 |
| 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.3 |
| 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.2 |
| 04-Nov-2020 |
rillig | make(1): fix line numbers in test output of cmdline-undefined.mk
|
1.1 |
| 04-Nov-2020 |
rillig | make(1): add test for undefined variables in command line arguments
The variable discardUndefined has an implicit negation in its name, which makes it hard to understand. Plus, most of the time it is true. It's better to have a flag that is false most of the time and has a positive name.
On the first attempt of inverting that variable, I stumbled upon MainParseArgs, which initially leaves discardUndefined == FALSE, and after handling the dashed options, sets it to TRUE. This would make a difference when more command line arguments would be added later via the .MAKEFLAGS special target.
Upon further inspection, the only place where discardUndefined is used is in VarAssign_EvalSubst in parse.c, and that place is not reachable from any of the dashed options. Therefore, discardUndefined could already be set at the very beginning of MainParseArgs or even when initializing the global variable itself, without any observable difference.
Not even the ::= variable modifier could do anything about this since it is not reachable from the dashed command line options as well, and in addition, it expands its right-hand side in any case, always discarding undefined variables. Oh, these little inconsistencies everywhere.
|