summaryrefslogtreecommitdiff
path: root/test/readline/test_readline.rb
diff options
context:
space:
mode:
authorLars Kanis <lars@greiz-reinsdorf.de>2020-01-18 18:46:37 +0100
committeraycabta <aycabta@gmail.com>2020-01-21 21:26:58 +0900
commitd1166c6d3942303b812c475129a84f1025b1db1f (patch)
tree04ca20222c18654407d00648eecfc8611dfc00d2 /test/readline/test_readline.rb
parent1de7941ff845ade36cc17c1325dc3453dab75f90 (diff)
Reline: Use a more robust detection of MinTTY
The previous detection per get_screen_size fails when stdout is passed to a pipe. That is the case when running ruby tests in parallel ("-j" switch). In this case Reline believes that it's running on MinTTY and the tests are running with ANSI IOGate instead of the Windows adapter on MINGW. So parallel test results were different to that of a single process. This commit fixes these differencies. The code is taken from git sources and translated to ruby. NtQueryObject() is replaced by GetFileInformationByHandleEx(), because NtQueryObject() is undocumented and is more difficult to use: https://github.com/git-for-windows/git/blob/c5a03b1e29c69f3f06c8fabd92493edb73469176/compat/winansi.c#L558
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2848
Diffstat (limited to 'test/readline/test_readline.rb')
0 files changed, 0 insertions, 0 deletions