summaryrefslogtreecommitdiff
path: root/test/io/console/test_io_console.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-13 14:28:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-13 14:28:53 +0000
commita7b0b52f09b63e8ffe28b0040b54ae71a4a829e4 (patch)
tree4dc5ccf1790b9efe273b6a5195f2b253b5e2a9e2 /test/io/console/test_io_console.rb
parentbcfc22b10e30771e692f7716a1fec7577373963e (diff)
* ext/io/console/console.c (console_dev): take care of no-ctty
case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/io/console/test_io_console.rb')
-rw-r--r--test/io/console/test_io_console.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/io/console/test_io_console.rb b/test/io/console/test_io_console.rb
index 030dcd38ed..5475a93fa3 100644
--- a/test/io/console/test_io_console.rb
+++ b/test/io/console/test_io_console.rb
@@ -160,3 +160,13 @@ class TestIO_Console < Test::Unit::TestCase
s.close if s
end
end if defined?(PTY) and defined?(IO::console)
+
+class TestIO_Console < Test::Unit::TestCase
+ require_relative '../../ruby/envutil'
+
+ def test_noctty
+ assert_in_out_err(["-rio/console"],
+ "Process.daemon(true, true); p IO.console",
+ ["nil"])
+ end
+end if defined?(Process.daemon) and defined?(IO::console)