diff options
author | Charles Oliver Nutter <[email protected]> | 2021-02-04 15:03:45 -0600 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-02-05 12:29:33 +0900 |
commit | abf71864a529d09047926defac875e001781a28f (patch) | |
tree | 49f875a29166ca3a2b32637c9642c5402eacfc93 /test/io/console/test_io_console.rb | |
parent | a1cc044ea18daa3b2f49d6c74095cb94c00cbc5a (diff) |
[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
Diffstat (limited to 'test/io/console/test_io_console.rb')
-rw-r--r-- | test/io/console/test_io_console.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index 2121fcdb63..3d12b1f463 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -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 $! |