Commit Graph

22 Commits

Author SHA1 Message Date
rillig 873c42efc3 make: provide more context information for parse/evaluate errors 2024-04-20 10:18:55 +00:00
rillig 1da4da3f90 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.
2023-11-19 21:47:52 +00:00
rillig 39078cb5cc tests/make: clean up, explain and reorganize several tests 2023-10-19 18:24:33 +00:00
rillig 0d4b11a49d make: clean up comments regarding gmtime/strftime
These two functions are not supposed to be used together, thus it is not
a bug if combining them produces unexpected results.
2023-08-19 11:53:10 +00:00
rillig 99f1a845d3 make: work around bugs in gmtime on several platforms 2023-08-19 11:13:35 +00:00
rillig b23bb1a017 tests/make: provide instructions for reproducing bug in gmtime
The test is not enabled because its results differ too much between the
platforms.
2023-08-19 10:33:32 +00:00
rillig 9fec43bd63 tests/make: document bug in ':gmtime' with '%s' 2023-08-19 08:19:25 +00:00
rillig 73d0a5078e 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.
2023-06-01 20:56:35 +00:00
rillig 154809d57d tests/make: clean up comments in tests 2023-05-10 15:53:32 +00:00
rillig f7574bd440 tests/make: clean up tests for ':gmtime' and ':localtime' 2023-05-09 16:31:41 +00:00
rillig 5206f882c3 make: allow ':gmtime' and ':localtime' with dynamic argument
This allows ${%Y:L:gmtime=${mtime}} instead of the indirect
${%Y:L:${:Ugmtime=${mtime}}}.

The direct form also prevents any ':' from the nested expression to be
interpreted as a separator, which doesn't matter for the ':gmtime' and
':localtime' modifiers but will prove useful for other modifiers that
follow the same pattern.
2023-05-09 16:26:59 +00:00
rillig 6b94bf57da tests/make: demonstrate parse bug in :gmtime and :localtime modifiers 2023-05-09 08:26:14 +00:00
rillig 74f981c380 make(1): fix tests for :gmtime and :localtime for 32-bit time_t
The comparison operator had accidentally been '!=' instead of '=='.

While here, proofread the documentation and add references for where the
32-bit time_t is defined on Linux and FreeBSD.
2021-01-19 05:26:34 +00:00
rillig 8a4190c0a5 make(1): fix commit number in tests for :gmtime and :localtime 2020-12-22 07:22:39 +00:00
rillig ecb61f4a92 make(1): align tests for :localtime with those for :gmtime
These tests had been almost the same before, now they are as similar as
possible again.
2020-12-21 20:47:29 +00:00
rillig 23e24e814c make(1): move tests for :gmtime to parse time
It's easier to have both the expressions and the expected values in a
single file.  This also allows for flexible handling of multiple
acceptable outputs, in this case for 32-bit time_t.
2020-12-21 20:35:17 +00:00
rillig d4b0b9ea9e make(1): add more tests for the variable modifier :localtime 2020-10-31 20:30:06 +00:00
rillig a6a1909faa make(1): add test for :gmtime with space before the number of seconds 2020-10-31 19:55:26 +00:00
rillig 102185fb1d make(1): add tests for error handling in the :gmtime variable modifier 2020-10-31 19:48:23 +00:00
rillig e05312f590 make(1): add test for default time format of the :gmtime modifier 2020-10-29 18:59:43 +00:00
rillig 70dfb9c270 make(1): move tests for the :gmtime and ::= modifiers to separate files 2020-08-16 12:48:55 +00:00
rillig d126d9d551 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.
2020-08-16 12:07:50 +00:00