Am 27.02.21 um 08:47 schrieb Johannes Sixt: > Am 24.02.21 um 20:50 schrieb Ævar Arnfjörð Bjarmason: >> Addresses feedback on v2. Since Junio & Johannes expressed a desire to >> keep the existing test scheme in t4018/* it's still there, but it's >> also possible to add *.sh tests in that directory to use the more >> familiar test framework used elsewhere in the test suite. >> >> The tests added here make use of it to e.g. supply custom -U<n> >> arguments, set config before the tests etc. >> >> I also improved that existing test support so you can have N tests in >> one file with (mostly) the existing test syntax. See the "userdiff >> tests: add a test with multiple tests in a LANG file" patch. > > I've read through all patches and had a comment here and there. I like a > lot that we can now put more than one test into a single file. > > However, I do not like the shell script version of tests, because the > syntax is so hard to read. Also, it looks to me that they are only > needed for a few tests that could just as well be coded as one-off tests > outside the framework. > > I've now pulled avar/t4018-diff-hunk-header-regex-tests-3 from your > github repo and will check again if I missed some cruicial points. I've now looked through the patch series again. I appreciate that you dug through the history and discovered and fixed a few deficiencies and loose ends. The way to throw all test cases for a language driver into a single file I like a lot, too. The way to specify expected results is manageable (modulo the dependency on the test number, t4018, that Junio mentioned). But I do not see the need for the framework provided by the new test_diff_funcname. At the end of the series, it is only used by Perl and custom driver tests. (I discount the new ADA and Ruby tests as they can easily migrated to the simple test scheme.) But then the Perl tests do not do anything special, either. The multi-line pattern test is just a nice add-on but not strictly needed. In the end, the Perl test is just as straight-forward as all others. That leaves the custom driver tests. I don't see the need for a new framework just for that. It would be sufficient to integrate them in main test file t4018-diff-funcname.sh if needed, or leave them in the existing framework if possible. -- Hannes