History log of /src/usr.bin/make/unit-tests/modmisc.exp |
Revision | | Date | Author | Comments |
1.48 |
| 16-Jun-2023 |
rillig | tests/make: clean up tests for the ':M' and ':S' modifiers
|
1.47 |
| 20-Dec-2020 |
rillig | make(1): move tests for indirect modifiers around
The next commit will error out on unknown modifiers and influence the exit status. The test modmisc.mk contains both parse time tests and run time tests. To prevent the latter from being run, the parse error is moved to varmod-indirect.mk, which only contains parse time tests.
|
1.46 |
| 23-Aug-2020 |
rillig | make(1): move tests for the :tu and :_ modifiers into separate files
|
1.45 |
| 23-Aug-2020 |
rillig | make(1): move tests for :hash :range :localtime into separate files
|
1.44 |
| 23-Aug-2020 |
rillig | make(1): move tests for :H :E :R :T into separate files
|
1.43 |
| 16-Aug-2020 |
rillig | make(1): move tests for the :gmtime and ::= modifiers to separate files
|
1.42 |
| 16-Aug-2020 |
rillig | make(1): move tests for :S, :C, :@ from modmisc to their separate tests
|
1.41 |
| 09-Aug-2020 |
rillig | make(1): add test that demonstrates possible delimiters for :S
|
1.40 |
| 09-Aug-2020 |
rillig | make(1): explain the mod-subst-dollar test
|
1.39 |
| 09-Aug-2020 |
rillig | make(1): add another test case for mod-subst-dollar
Having only 8 dollar signs does not prove anything. It might still be the result of 3 substitutions in a row. Having 5 substitutions in a row is less likely though.
|
1.38 |
| 08-Aug-2020 |
rillig | make(1): add test for the :gmtime modifier with indirect time
|
1.37 |
| 08-Aug-2020 |
rillig | make(1): add test for unknown sub-modifier of the :S modifier
|
1.36 |
| 07-Aug-2020 |
rillig | make(1): add tests for creative variable names in the :@ modifier
|
1.35 |
| 01-Aug-2020 |
rillig | make(1): fix error message when regcomp fails
If regcomp fails, it's not the regex substitution that is erroneous, but the regex compilation.
|
1.34 |
| 01-Aug-2020 |
rillig | make(1): add tests for indirect modifiers
|
1.33 |
| 31-Jul-2020 |
rillig | make(1): add test for chaining the :S modifier without colon
|
1.32 |
| 29-Jul-2020 |
rillig | make(1): remove unnecessary assignments to st->next
No change in the size of the resulting binary. Apparently GCC already knew these assignments were redundant.
|
1.31 |
| 29-Jul-2020 |
rillig | make(1): add unit tests for parse errors in modifiers
|
1.30 |
| 27-Jul-2020 |
rillig | make(1): replace macros with functions
Having the hidden parameter st->endc in the macro made it unnecessarily difficult to understand the code.
|
1.29 |
| 26-Jul-2020 |
rillig | make(1): use consistent test names in modmisc.mk
|
1.28 |
| 25-Jul-2020 |
rillig | make(1): add test for brk_string with more than 50 words
|
1.27 |
| 23-Jul-2020 |
rillig | make(1): fix wrong warning about missing delimiter
|
1.26 |
| 23-Jul-2020 |
rillig | make(1): demonstrate wrong error message about missing delimiter
The current practice of setting st->delim at the beginning of each modifier and resetting it again at the end produces too many error messages. In this case, there is no missing delimiter.
|
1.25 |
| 21-Jul-2020 |
rillig | make(1): add test for :S,,sep
The empty string does not match anywhere. In other implementations of string replacement, an empty string matches at every position of the source string.
This only works for the :S modifier. The :C modifier does not allow an empty search pattern.
|
1.24 |
| 21-Jul-2020 |
rillig | make(1): add test for :Q and .newline
|
1.23 |
| 20-Jul-2020 |
rillig | make(1): fix edge cases with $ at the end of the :@ modifier
In both parts of the :@ modifier, by passing &pflags to ParseModifierPart, a final $ was interpreted as an anchor, which only makes sense in the :S and :C modifiers.
This edge case is neither used by src nor by pkgsrc, except for the unit tests that have been adjusted.
|
1.22 |
| 20-Jul-2020 |
rillig | make(1): add test for nested assignments
This test demonstrates that in ApplyModifier_Assign, the call to ParseModifierPart must get its pflags.
|
1.21 |
| 20-Jul-2020 |
rillig | make(1): add test for :tu modifier with spaces
|
1.20 |
| 20-Jul-2020 |
rillig | make(1): make modifier handling simpler
Implementing a modifier such as :S or :M should not be concerned with separating the words of the resulting string. Ideally this should be done in the same way by all modifiers.
Before, the :R (filename root) modifier added a separator even if the resulting filename root was an empty string. The chances that this change in behavior breaks anything are epsilon.
The :@ modifier, if it appeared after a :ts modifier, did not use the word separator from the :ts modifier (which all other modifiers do) but always added a space. This behavior has been preserved for now. It's an unnecessary inconsistency though.
In contrast to Buffer, the newly added SepBuf uses size_t for memory sizes and also uses the conventional parameter order (mem, memsize) instead of the unusual (memsize, mem).
|
1.19 |
| 19-Jul-2020 |
rillig | make(1): add tests for the ::= modifiers
|
1.18 |
| 19-Jul-2020 |
rillig | make(1): add tests for maximum number of capturing groups in :C
|
1.17 |
| 19-Jul-2020 |
rillig | make(1): fix off-by-one error in :C modifier
Previously this off-by-one error had invoked undefined behavior. Until today there was no corresponding unit test though.
|
1.16 |
| 19-Jul-2020 |
rillig | make(1): demonstrate off-by-one bug in :C modifier
|
1.15 |
| 19-Jul-2020 |
rillig | make(1): add test for stray dollar signs in :@ modifier
|
1.14 |
| 04-Jul-2020 |
rillig | make(1): ignore system-specific error message from regcomp in test
NetBSD 8 has: repetition-operator operand invalid Ubuntu has: Invalid preceding regular expression
|
1.13 |
| 04-Jul-2020 |
rillig | make(1): add tests for dollar characters in modifiers
|
1.12 |
| 04-Jul-2020 |
rillig | make(1): expand the test for variable expansion in the :@ modifier
|
1.11 |
| 04-Jul-2020 |
rillig | make(1): add debugging output for :@ modifier
The inner working of the :@ modifier is quite tricky. To understand what really happens, it helps to look at each word as it is being modified.
|
1.10 |
| 04-Jul-2020 |
rillig | make(1): add test for an obscure edge case of using the :@ modifier
|
1.9 |
| 04-Jul-2020 |
rillig | make(1): add tests for the :S and :C modifiers
|
1.8 |
| 03-Jul-2020 |
rillig | make(1): clean up documentation, small refactorings for variables
- document the callback for VarModify - clearly mark the callbacks - shorten the documentation for some callback functions - fix the documentation of VarSYSVMatch - remove unnecessary null check from VarLoopExpand - add test for applying modifiers to empty strings
|
1.7 |
| 03-Jul-2020 |
rillig | make(1): add expected test result for modmisc
|
1.6 |
| 03-Jul-2020 |
rillig | make(1): fix bug in :E modifier, introduced in r1.239 today
That case was not covered by the tests before.
|
1.5 |
| 03-Jul-2020 |
rillig | make(1): add test for :R modifier
|
1.4 |
| 03-Jul-2020 |
rillig | make(1): add more tests for :H, :T and :E modifiers
|
1.3 |
| 03-Jul-2020 |
rillig | make(1): add test for :H and :T modifiers with several words
|
1.2 |
| 03-Jul-2020 |
rillig | make(1): add missing test for the :H and :T modifiers
|
1.1 |
| 21-Aug-2014 |
apb | Give each group of tests its own output file.
* Rename each sub-makefile to *.mk; * Add a *.exp file of expected output for each sub-makefile; * Remove test.exp, which is replaced by all the other *.exp files. * Use suffix rules to generate *.rawout and *.out files for each test case. * Rewrite the test and accept targets to adapt to the new way.
The old (now removed) test.exp file is almost identical to the concatenation (in the correct order) of all the new *.exp files. There are expected differences in makefile names embedded in the output, and the new "exit status" lines. Some old "*** Error code 1 (ignored)" lines are also removed (replaced by new "exit status 1" lines).
|