patch 9.1.2033: tests: Test_terminal_cwd flaky when using ConPTY
Problem: tests: Test_terminal_cwd in test_terminal.vim fails flaky
in the Windows ConPTY terminal.
Solution: In ConPTY, the timeout is extended to 1msec when reading a
channel associated with a job that is about to finish. This
allows Vim to read the last output of a process in a pseudo
console. Add comments to make the reasoning clear.
(Muraoka Taro)
Processes that terminate too quickly in the ConPTY terminal cause Vim to
miss their final output.
In my environment, the probability of the "cmd /D /c cd" used in
Test_terminal_cwd occurring is about 1/4. For a simple statically
linked Hello World, the probability of it occurring is about 3/4.
closes: #19036
Signed-off-by: Muraoka Taro <koron.kaoriya@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>