History log of /src/usr.bin/make/unit-tests/cond-token-plain.exp |
Revision | | Date | Author | Comments |
1.25 |
| 06-Jul-2025 |
rillig | make: complain about unfinished escape sequences or string literals
|
1.24 |
| 06-Jul-2025 |
rillig | tests/make: demonstrate missing error for unfinished word in condition
|
1.23 |
| 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.22 |
| 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.21 |
| 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.20 |
| 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.19 |
| 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.18 |
| 14-Feb-2023 |
rillig | make: don't interpret the return value of Var_Parse
The return value of Var_Parse is largely redundant to the returned string. The idea behind the type VarParseResult was to migrate all call sites to checking this return value instead of the returned string, but that hasn't happened. Instead, the additional type only added more complexity.
There was a single place where that return value was actually used, when parsing conditions. And even in that case, ignoring the VarParseResult added back an error message that previously hid bugs, in the test cond-token-plain.mk.
Even though these error messages are redundant in the other tests, they don't hurt as they don't happen often.
|
1.17 |
| 25-Sep-2022 |
rillig | tests/make: reduce trailing whitespace
|
1.16 |
| 03-Mar-2022 |
rillig | make: make debug logging for comparisons less technical
|
1.15 |
| 08-Jan-2022 |
rillig | make: fix reported line numbers of continuation lines (since 2002)
Previously, multi-line directives like '.info' or '.error' reported the line number of their last line instead of their first line, which is more usual. This also affected the debug log from '-dp'.
|
1.14 |
| 30-Dec-2021 |
rillig | tests/make: demonstrate edge case that evaluates an expression twice
|
1.13 |
| 12-Dec-2021 |
rillig | tests/make: refine comments for parsing and evaluating conditions
|
1.12 |
| 21-Sep-2021 |
rillig | make: do not allow unquoted 'left == right' after modifier ':?'
Having a static variable for state that clearly belongs in the parser looked suspicious, and indeed it was wrong.
When the distinction between .if conditions and expressions of the form ${condition:?:} was added in cond.c 1.68 from 2015-05-05, a new unit test was added, but it didn't cover this edge case. At that time, the state of the condition parser consisted of a few global variables instead of a separate data type, as would have been appropriate for parsing nested conditions.
|
1.11 |
| 21-Sep-2021 |
rillig | tests/make: demonstrate unintended unquoted string in conditions
|
1.10 |
| 21-Jun-2021 |
rillig | make: fix grammar in error message for malformed conditional
|
1.9 |
| 21-Jan-2021 |
rillig | make(1): replace warning + error with just an error in conditionals
Before, there was a "warning" for comparing strings using '<', which was wrong. That warning was then followed by an error, after parsing the whole conditional. This was only because it was easier to implement.
Replace the warning with an actual error. This only affects conditionals in .if lines, the conditionals in the :? modifier such as ${"A" < "B":?smaller:greater} still print 2 errors.
|
1.8 |
| 21-Jan-2021 |
rillig | make(1): fix debug output for comparison operators in conditionals
This produces fewer warnings than before, but these were edge cases that probably didn't matter in practice. The "Malformaed conditional" is still generated, the set of accepted conditionals is still the same.
|
1.7 |
| 21-Jan-2021 |
rillig | make(1): demonstrate parse error without error message in conditional
|
1.6 |
| 21-Jan-2021 |
rillig | make(1): add test case for bare word containing quotes
|
1.5 |
| 21-Jan-2021 |
rillig | make(1): add more tests for edge cases in conditionals
|
1.4 |
| 21-Jan-2021 |
rillig | make(1): add more tests for tokens in conditionals
|
1.3 |
| 12-Sep-2020 |
rillig | make(1): add tests for comparison tokens without whitespace
|
1.2 |
| 11-Sep-2020 |
rillig | make(1): add tests for really strange edge cases in conditions
|
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.
|