summaryrefslogtreecommitdiff
path: root/usr.bin/make/unit-tests/directive-for.mk
AgeCommit message (Collapse)Author
2023-06-01tests/make: force line-based diagnostics to be listed in the testsrillig
This way, contradictions between the intended output and the actual output are closer together and have a better chance of being spotted.
2023-06-01tests/make: clean up comments, extend a few testsrillig
2023-05-10tests/make: clean up tests for .for loopsrillig
Most of the tests from forloop.mk were already in directive-for.mk.
2023-05-09make: skip syntactically wrong .for loopsrillig
When a .for loop cannot be interpreted correctly, for example when there are no iteration variables or the number of words doesn't match the iteration variables, skip the body of the .for loop instead of interpreting it once.
2023-05-08make: disallow characters like '$' in variable names in .for loopsrillig
Fixes PR 53146.
2023-05-08tests/make: add more tests for unusual variable names in .for loopsrillig
2023-05-08make: fix parsing of unusual line continuations in .for loopsrillig
2022-10-01tests/make: make comment in test for .for easier to understandrillig
2022-08-23tests/make: demonstrate that .for variables take precedencerillig
2022-01-15tests/make: ensure that the 'expect' comments in tests are correctrillig
Based on tests/usr.bin/xlint/check-expect.lua. For now, this extra check needs to be run manually.
2022-01-08tests/make: demonstrate edge case in parsing .for loopsrillig
2022-01-02tests/make: test edge cases in .for loopsrillig
2020-12-27make(1): add test for missing error handling in .for looprillig
2020-11-15make(1): update and add comments in testsrillig
As a result of the new comments, some line numbers have changed in the output of the tests. No other changes.
2020-10-25make(1): test funny character in .for variable namesrillig
2020-10-25make(1): add test for escaping parentheses and braces in .for loopsrillig
2020-10-24make(1): use consistent indentation in variable assignmentsrillig
Initial work by "pkglint -F *.mk", manually adjusted in a few places.
2020-09-22make(1): remove obsolete fix for PR bin/29985rillig
2020-09-22make(1): add test for .for loop from PR bin/29985rillig
2020-09-14make(1): add test for nested .for loops with the same variable namerillig
2020-09-02make(1): fix wrong comments in test for the .for looprillig
These comments were my original assumptions, which I wrote before running the test and before looking at the implementation.
2020-09-02make(1): add test for the .for directiverillig
For a long time, I had assumed that the iteration variables of a .for loop are just normal global variables. This assumption was wrong but didn't have any consequences. The iteration variables of a .for loop can just be accessed like global variables, therefore it is not obvious that they are implemented in a completely different way. There are some edge cases in conditions used inside .for loops, in which the iteration variables cannot be used like normal variables. An example is brought up in https://gnats.netbsd.org/47888, which observes that the defined() and empty() functions in conditions only work with variables but ignore the iteration "variables", simply because these are not variables but only expressions.