summaryrefslogtreecommitdiff
path: root/test/reline
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2024-06-04 11:32:54 -0700
committerTakashi Kokubun <[email protected]>2024-06-04 11:33:12 -0700
commit5ea843f9b237c08dbdc82125462cf431bd885c7b (patch)
tree7807da62916bd2e46f5c33b5ee6673c840ff52c3 /test/reline
parent40a9e806f2e83cf5e26f8fa52ad4f624a4118915 (diff)
Revert "Revert "[ruby/reline] Reline::ANSI is general io. Reline::GeneralIO is not.""
This reverts commit 6e84ac2359c8fc8cb686ef4644b9cae26cd5ab9e. Now that the rubygems spec change has been merged, let's try reverting this and fixing it with tompng's new patch.
Diffstat (limited to 'test/reline')
-rw-r--r--test/reline/yamatanooroti/test_rendering.rb12
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(%{> })'}