mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[DOC]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
13e15287cb
commit
57b87a00f8
2 changed files with 16 additions and 0 deletions
|
@ -503,6 +503,14 @@ pty_close_pty(VALUE assoc)
|
|||
* +slave_file+:: the slave of the pty, as a File. The path to the
|
||||
* terminal device is available via +slave_file.path+
|
||||
*
|
||||
* IO#raw! is usable to disable newline conversions:
|
||||
*
|
||||
* require 'io/console'
|
||||
* PTY.open {|m, s|
|
||||
* s.raw!
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
*/
|
||||
static VALUE
|
||||
pty_open(VALUE klass)
|
||||
|
|
|
@ -68,6 +68,14 @@ class TestIO_Console < Test::Unit::TestCase
|
|||
}
|
||||
end
|
||||
|
||||
def test_raw!
|
||||
helper {|m, s|
|
||||
s.raw!
|
||||
s.print "foo\n"
|
||||
assert_equal("foo\n", m.gets)
|
||||
}
|
||||
end
|
||||
|
||||
def test_cooked
|
||||
helper {|m, s|
|
||||
assert_send([s, :echo?])
|
||||
|
|
Loading…
Reference in a new issue