mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/io-console] Mark all tests that use run_pty as pend on JRuby
JRuby's PTY.spawn does not produce a process with its own controlling terminal, which is necessary for testing these raw escape sequences. This commit marks those tests as pending. The functionality tested appears to work at a command line, but due to this PTY bug in JRuby we cannot test it this way. See https://github.com/jruby/jruby/issues/6552 https://github.com/ruby/io-console/commit/a486b72e5e https://github.com/ruby/io-console/commit/b5c8e7bfd8
This commit is contained in:
parent
a1cc044ea1
commit
abf71864a5
1 changed files with 2 additions and 2 deletions
|
@ -323,8 +323,6 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do
|
|||
end
|
||||
|
||||
def test_cursor_position
|
||||
return if RUBY_ENGINE == 'jruby'
|
||||
|
||||
run_pty("#{<<~"begin;"}\n#{<<~'end;'}") do |r, w, _|
|
||||
begin;
|
||||
con = IO.console
|
||||
|
@ -421,6 +419,8 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do
|
|||
end
|
||||
|
||||
def run_pty(src, n = 1)
|
||||
pend("PTY.spawn cannot control terminal on JRuby") if RUBY_ENGINE == 'jruby'
|
||||
|
||||
r, w, pid = PTY.spawn(EnvUtil.rubybin, "-I#{TestIO_Console::PATHS.join(File::PATH_SEPARATOR)}", "-rio/console", "-e", src)
|
||||
rescue RuntimeError
|
||||
omit $!
|
||||
|
|
Loading…
Add table
Reference in a new issue