diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2e8777e..834a8d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,6 +52,8 @@ jobs: - name: Run test run: rake # Attempting without 'bundle exec' timeout-minutes: 3 + env: + TESTOPTS: ${{ startsWith(matrix.ruby, 'jruby') && '--verbose=verbose' || '' }} - id: build run: | rake build diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index 838abb4..13a26ee 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -535,6 +535,7 @@ def assert_ctrl(expect, cc, r, w) w.print cc w.flush result = EnvUtil.timeout(3) {r.gets} + assert_not_nil(result) if result case cc.chr when "\C-A".."\C-_" @@ -572,7 +573,7 @@ def test_intr if cc = ctrl["intr"] assert_ctrl("#{cc.ord}", cc, r, w) assert_ctrl("#{cc.ord}", cc, r, w) - assert_ctrl("Interrupt", cc, r, w) unless host_os?(/linux/) + assert_ctrl("Interrupt", cc, r, w) unless host_os?(/linux/) or RUBY_ENGINE == "jruby" end if cc = ctrl["dsusp"] assert_ctrl("#{cc.ord}", cc, r, w) @@ -631,8 +632,6 @@ def helper end def run_pty(src, n = 1) - pend("PTY.spawn cannot control terminal on JRuby") if RUBY_ENGINE == 'jruby' - args = [TestIO_Console::INCLUDE_OPTS, "-rio/console", "-e", src] args.shift if args.first == "-I" # statically linked r, w, pid = PTY.spawn(EnvUtil.rubybin, *args)