summaryrefslogtreecommitdiff
path: root/test/io/console/test_io_console.rb
diff options
context:
space:
mode:
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)