Home | History | Annotate | Download | only in unit-tests
History log of /src/usr.bin/make/unit-tests/cond-cmp-numeric.exp
RevisionDateAuthorComments
 1.13  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.12  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.11  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.10  04-Jul-2024  rillig make: on error, print the targets to be made

This helps to understand situations with several nested sub-makes in
varying directories.
 1.9  04-Mar-2023  rillig branches: 1.9.2;
tests/make: test very small and very large numbers in conditions
 1.8  04-Sep-2022  rillig make: add more details to error message for numeric comparison

Before:
String comparison operator must be either == or !=

After:
Comparison with '>=' requires both operands 'no' and '10' to be numeric

Noticed by martin@ in pkgsrc/textproc/py-pygments.
 1.7  03-Mar-2022  rillig make: make debug logging for comparisons less technical
 1.6  29-Jul-2021  rillig tests/make: test spaces around numbers in comparisons

Just to see whether it is possible to write a conditional in the form
${ ${A} < ${B} :? ${A} : ${B} }, that is, with leading and trailing
whitespace, to make it easier for humans to read the code.

It's not possible, the result of this computation cannot be used in
further numeric comparisons, at least not in .if directives. Leading
space would work, but trailing space wouldn't.

On the other hand, they would work in expressions of the form
${ ${A} < ${B} :? ... : ... } since in these, the condition is first
expanded and then parsed. But that is an implementation detail that is
not documented and it is also difficult to understand.
 1.5  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.4  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.3  08-Nov-2020  rillig make(1): add test for wrong comparison operator in conditional
 1.2  12-Sep-2020  rillig make(1): add test for Infinity and NaN

Neither is recognized by the make parser, which is good since the main
task of make is dependency resolution and text processing, not
calculating.
 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.
 1.9.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed