diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-25 02:45:50 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-25 02:45:50 +0000 |
commit | aa23f6b9fdecbf3be3e21b0f6b40e2b22f125090 (patch) | |
tree | fcdd938f347b4c1fb5c75639e334f6b7fec60771 /test/ruby/test_io.rb | |
parent | 0996ae361a62db5094eb3d8cc59c7d002170c285 (diff) | |
download | ruby-aa23f6b9fdecbf3be3e21b0f6b40e2b22f125090.tar.gz |
* io.c (ioctl_narg_len, linux_iocparm_len): reinstantiate linux
specific narg length calculation.
* test/ruby/test_io.rb (test_ioctl_linux2): add new test for old and
unstructured ioctl.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 8899994897..01b3e681e5 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2123,6 +2123,19 @@ End assert_equal(File.size(__FILE__), buf.unpack('i!')[0]) end + def test_ioctl_linux2 + return if /linux/ !~ RUBY_PLATFORM + return if /^i?86|^x86_64/ !~ RUBY_PLATFORM + + File.open('/dev/tty') { |f| + tiocgwinsz=0x5413 + winsize="" + assert_nothing_raised { + f.ioctl(tiocgwinsz, winsize) + } + } + end + def test_setpos mkcdtmpdir { File.open("tmp.txt", "w") {|f| |