first, tests should be included in the wine non regression test (not sure from reading if it's the case or not) They eventually will be, assuming you are talking about dlls/kernel32/tests/console.c. But for the moment, I am running my tests apart from the other non-regression tests(My tests are quite ad-hoc right now).
a suggested work around is to start the tests with FreeConsole()/AllocConsole() Hmm alright, I shall try that out. Now that you mention it, I see that some test cases already use such a mechanism.
On Mon, May 25, 2026 at 12:57 PM Eric Pouech via Wine-Devel < wine-devel@list.winehq.org> wrote:
Le 24/05/2026 à 17:17, Barath Rk via Wine-Devel a écrit :
I am trying to implement the ReadConsoleInputExW function, and while writing tests for the same, realized that the behaviour of my test programs vary across consoles inside my Windows 10 VM. For example, the output is different when I use cmd to run the tests versus using MSYS2(which uses mintty) to run the tests.
My question is: should the behaviour exhibited by the test program when run on cmd in Windows be taken as the canonical reference in this case? If so, then when testing my implementation on the programs using wine, is it enough for the output in wineconsole to be consistent with the cmd output?
Thanks in advance.
first, tests should be included in the wine non regression test (not sure from reading if it's the case or not)
secondly, tests should be written in a way that they are not sensible to the environment (or IOW, if needed, the env shall be constrained by the tests themselves)
in your case, it's likely the tests are written using "current" console, which may introduce some discrepancies; a suggested work around is to start the tests with FreeConsole()/AllocConsole() which will ensure the test will be run in its dedicated console (note however, that in that case, test should be added towards the end of the list of tests in kernel32/tests/console.c as first tests are supposed to be run agains "current" console)