Up to [cvs.NetBSD.org] / src / usr.bin / make / unit-tests
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
make(1): remove debug output from counter tests Now that the tests work as intended, the debug information is no longer necessary. It was only intended to track down the cause of the unexpected behavior.
make(1): fix unexpected behavior in ::= variable modifier Previously, the ::= modifier had returned an error value, which caused the variable expression to be preserved. This behavior was not useful in this case; it had only been intended to be used for undefined variables. To fix it, distinguish between parse errors, undefined variables and regular empty strings.
make(1): move VAR_JUNK and VAR_KEEP away from VarFlags These two flags have nothing to do with a variable. They are only used while evaluating a variable expression. While here, rename the flags and make their documentation more precise.
make(1): shorten debug output of ApplyModifiers Having the words "eflags" and "vflags" in the debug output was too repetitive. That they are flags is made obvious by the '|' separator, and the flags have clearly distinguishable names (VARE_* vs. VAR_*), which lowers the chance for confusion.
make(1): add debug logging for Var_Parse This will hopefully help with tracking down why the "Undefined variable" error message is not triggered. There is some other non-obvious behavior nearby. In Parse_DoVar, the != assignment operator evaluates the variable using VARE_UNDEFERR, but there is not even a warning for the following line: != echo err ${UNDEFINED} 1>&2
make(1): add more detailed debug logging for variable modifiers Before a modifier is applied to a variable, it is not yet parsed, therefore it is only possible to log a rough estimate of the modifier. But after applying it, the parsing position has advanced, and the full modifier can be logged. In addition, to fully understand how the modifiers work, it's not enough to just know the variable names and values, there are also some flags that influence how the modifiers behave. The most influential is VARE_WANTRES. Thanks to sjg for the extensive review and valuable feedback on the first drafts.
make(1): remove debug output from uncommitted code from test Note to self: don't accept the test results when there are uncommitted parts in the code.
make(1): add test for nested VAR_SUBST assignments