mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/io-console] Bug 17128: In test_set_winsize_console, wrapped re-size in a begin-rescue-else.
https://github.com/ruby/io-console/commit/a22333c33a
This commit is contained in:
parent
b3c1c767ea
commit
f4b9e94317
1 changed files with 8 additions and 4 deletions
|
@ -443,10 +443,14 @@ defined?(IO.console) and TestIO_Console.class_eval do
|
|||
s = IO.console.winsize
|
||||
assert_nothing_raised(TypeError) {IO.console.winsize = s}
|
||||
bug = '[ruby-core:82741] [Bug #13888]'
|
||||
begin
|
||||
IO.console.winsize = [s[0], s[1]+1]
|
||||
assert_equal([s[0], s[1]+1], IO.console.winsize, bug)
|
||||
rescue Errno::EINVAL # Error if run on an actual console.
|
||||
else
|
||||
IO.console.winsize = s
|
||||
assert_equal(s, IO.console.winsize, bug)
|
||||
end
|
||||
ensure
|
||||
set_winsize_teardown
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue