diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb index 1878264..74c5a0a 100644 --- a/test/io/console/test_io_console.rb +++ b/test/io/console/test_io_console.rb @@ -610,6 +610,10 @@ def test_intr end end + def test_getch_timeout + assert_equal(["nil"], run_pty("p IO.console.getch(intr: true, time: 0.1, min: 0)")) + end + unless IO.console def test_close assert_equal(["true"], run_pty("IO.console.close; p IO.console.fileno >= 0")) @@ -719,7 +723,7 @@ def test_sync def test_getch_timeout assert_nil(IO.console.getch(intr: true, time: 0.1, min: 0)) - end + end if ENV["CI"] def test_ttyname return unless IO.method_defined?(:ttyname)