diff options
author | tomoya ishida <[email protected]> | 2024-06-03 23:28:29 +0900 |
---|---|---|
committer | git <[email protected]> | 2024-06-03 14:28:33 +0000 |
commit | ba01d15cf5db96933905d669c68f5cc0cd6910b8 (patch) | |
tree | 7de18b0edfdb5444248adc44300f8fcb16eee095 /test/reline | |
parent | 7aa1bca2c9d8f002b0cc6d6730318d726d20d52d (diff) |
[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
Diffstat (limited to 'test/reline')
-rw-r--r-- | test/reline/yamatanooroti/test_rendering.rb | 12 |
1 files changed, 12 insertions, 0 deletions
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(%{> })'} |