diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-10-13 02:07:16 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-10-13 02:24:01 +0900 |
commit | 41db84aa304e48f1b5082bb8a7b1536501b50c79 (patch) | |
tree | 795f61b6fe86fd628fb66b6bc8f6c4c5100755af /test/reline | |
parent | 013bac15b01b69b8f556074bc30333dc913b9118 (diff) | |
download | ruby-41db84aa304e48f1b5082bb8a7b1536501b50c79.tar.gz |
[ruby/reline] Skip when unable to set input
`Reline::Windows` always reads from the console by Windows API
using fiddle.
https://github.com/ruby/reline/commit/c3bf85f5af
Diffstat (limited to 'test/reline')
-rw-r--r-- | test/reline/test_reline.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/reline/test_reline.rb b/test/reline/test_reline.rb index 3e5ad2f874..dd049ac127 100644 --- a/test/reline/test_reline.rb +++ b/test/reline/test_reline.rb @@ -280,9 +280,14 @@ class Reline::Test < Reline::TestCase assert_raise(TypeError) do Reline.output = "This is not a file." end + input, to_write = IO.pipe to_read, output = IO.pipe - Reline.input, Reline.output = input, output + unless Reline.__send__(:input=, input) + omit "Setting to input is not effective on #{Reline::IOGate}" + end + Reline.output = output + to_write.write "a\n" result = Reline.readline to_write.close |