mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_io.rb: workaround for Docker
* test/ruby/test_io.rb (test_ioctl_linux2): tty device may not work on Docker. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e3e17eb975
commit
8b583a013a
1 changed files with 8 additions and 2 deletions
|
@ -2891,13 +2891,19 @@ End
|
|||
|
||||
def test_ioctl_linux2
|
||||
return unless STDIN.tty? # stdin is not a terminal
|
||||
File.open('/dev/tty') { |f|
|
||||
begin
|
||||
f = File.open('/dev/tty')
|
||||
rescue Errno::ENOENT, Errno::ENXIO => e
|
||||
skip e.message
|
||||
else
|
||||
tiocgwinsz=0x5413
|
||||
winsize=""
|
||||
assert_nothing_raised {
|
||||
f.ioctl(tiocgwinsz, winsize)
|
||||
}
|
||||
}
|
||||
ensure
|
||||
f.close if f
|
||||
end
|
||||
end if /^(?:i.?86|x86_64)-linux/ =~ RUBY_PLATFORM
|
||||
|
||||
def test_setpos
|
||||
|
|
Loading…
Add table
Reference in a new issue