From ba01d15cf5db96933905d669c68f5cc0cd6910b8 Mon Sep 17 00:00:00 2001 From: tomoya ishida Date: Mon, 3 Jun 2024 23:28:29 +0900 Subject: [ruby/reline] Reline::ANSI is general io. Reline::GeneralIO is not. (https://github.com/ruby/reline/pull/659) Reline::ANSI has a partial non-tty supporting code. It should be a general io. Reline::Dumb should be only used in testing. https://github.com/ruby/reline/commit/2d6828473d --- test/reline/yamatanooroti/test_rendering.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb index 1cf46b4cd1..f119d686cd 100644 --- a/test/reline/yamatanooroti/test_rendering.rb +++ b/test/reline/yamatanooroti/test_rendering.rb @@ -969,6 +969,18 @@ begin EOC end + def test_nontty + omit if Reline.core.io_gate.win? + cmd = %Q{ruby -e 'puts(%Q{ello\C-ah\C-e})' | ruby -I#{@pwd}/lib -rreline -e 'p Reline.readline(%{> })' | ruby -e 'print STDIN.read'} + start_terminal(40, 50, ['bash', '-c', cmd]) + sleep 1 + close rescue nil + assert_screen(<<~'EOC') + > hello + "hello" + EOC + end + def test_eof_with_newline omit if Reline.core.io_gate.win? cmd = %Q{ruby -e 'print(%Q{abc def \\e\\r})' | ruby -I#{@pwd}/lib -rreline -e 'p Reline.readline(%{> })'} -- cgit v1.2.3