summaryrefslogtreecommitdiff
path: root/test/io
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-25 08:43:34 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-25 08:43:34 +0000
commit7393bf6a5cfff63683f36535e293caaa0d4c5be0 (patch)
tree753755854e63e4f3a904dc7d1db6df7358aef25b /test/io
parent74051762fe4072dc96d64f00ee53dd641c3fd687 (diff)
parentfe0ab0517a6cc71b06f0fe1b074f3f2e8e213862 (diff)
add tag v2_2_0v2_2_0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v2_2_0@49005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/io')
-rw-r--r--test/io/console/test_io_console.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb
index 237a41a35f..3481a2b213 100644
--- a/test/io/console/test_io_console.rb
+++ b/test/io/console/test_io_console.rb
@@ -222,14 +222,22 @@ class TestIO_Console < Test::Unit::TestCase
IO.console.close
assert_kind_of(IO, IO.console)
assert_nothing_raised(IOError) {IO.console.fileno}
+
+ IO.console(:close)
+ assert(IO.console(:tty?))
+ ensure
+ IO.console(:close)
end
def test_sync
assert(IO.console.sync, "console should be unbuffered")
+ ensure
+ IO.console(:close)
end
else
def test_close
assert_equal(["true"], run_pty("IO.console.close; p IO.console.fileno >= 0"))
+ assert_equal(["true"], run_pty("IO.console(:close); p IO.console(:tty?)"))
end
def test_sync