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
@ -2891,13 +2891,19 @@ End
|
|||||||
|
|
||||||
def test_ioctl_linux2
|
def test_ioctl_linux2
|
||||||
return unless STDIN.tty? # stdin is not a terminal
|
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
|
tiocgwinsz=0x5413
|
||||||
winsize=""
|
winsize=""
|
||||||
assert_nothing_raised {
|
assert_nothing_raised {
|
||||||
f.ioctl(tiocgwinsz, winsize)
|
f.ioctl(tiocgwinsz, winsize)
|
||||||
}
|
}
|
||||||
}
|
ensure
|
||||||
|
f.close if f
|
||||||
|
end
|
||||||
end if /^(?:i.?86|x86_64)-linux/ =~ RUBY_PLATFORM
|
end if /^(?:i.?86|x86_64)-linux/ =~ RUBY_PLATFORM
|
||||||
|
|
||||||
def test_setpos
|
def test_setpos
|
||||||
|
Loading…
x
Reference in New Issue
Block a user