sorry looks I forgot to post following bits alongside previous comments
---
(general note: you'd better update the previous MR rather than closing/creating a new one as we lose some context)
for the tests: * IMO adding a test dependency to winhelp.exe (even from system dir) could cause trouble on some configurations (and it takes for granted that it always contains a ctrl-z character) * it's already a pain to swing back and forth between the two files for input / expected output, so I'd rather not add another test file creation into batch.c * unfortunately, trying to create the test file inside test_builtin.cmd using the @\x1b@ sequence doesn't work (it looks like native just erases ctrl-z from the input in that case) * so I'd ended up with [test-type.patch](/uploads/bc7b0de8295a24a1242c043c36043387/test-type.patch) instead * (and we should also get rid at some point of create_test_nul_file() in batch.c and move test file creation in test_builtins.cmd) * and adding tests should be first patch in MR (so it's clearer in subsequent patches what has been fixed by removing the todo_wine)