mirror of
https://github.com/ruby/ruby.git
synced 2025-09-20 11:03:58 +02:00
Sync io-console gem.
This commit is contained in:
parent
38a3965dea
commit
f27eb8148f
2 changed files with 14 additions and 2 deletions
|
@ -407,6 +407,10 @@ defined?(PTY) and defined?(IO.console) and TestIO_Console.class_eval do
|
|||
assert_equal(["true"], run_pty("IO.console(:close); p IO.console(:tty?)"))
|
||||
end
|
||||
|
||||
def test_console_kw
|
||||
assert_equal(["File"], run_pty("IO.console.close; p IO.console(:clone, freeze: true).class"))
|
||||
end
|
||||
|
||||
def test_sync
|
||||
assert_equal(["true"], run_pty("p IO.console.sync"))
|
||||
end
|
||||
|
@ -483,6 +487,10 @@ defined?(IO.console) and TestIO_Console.class_eval do
|
|||
IO.console(:close)
|
||||
end
|
||||
|
||||
def test_console_kw
|
||||
assert_kind_of(IO, IO.console(:clone, freeze: true))
|
||||
end
|
||||
|
||||
def test_sync
|
||||
assert(IO.console.sync, "console should be unbuffered")
|
||||
ensure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue