summaryrefslogtreecommitdiff
path: root/test/test_pty.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_pty.rb')
-rw-r--r--test/test_pty.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_pty.rb b/test/test_pty.rb
index 1f0f8d6b311..dff025686d3 100644
--- a/test/test_pty.rb
+++ b/test/test_pty.rb
@@ -1,6 +1,7 @@
require 'test/unit'
require_relative 'ruby/envutil'
require 'shellwords'
+require 'tmpdir'
begin
require 'pty'
@@ -123,5 +124,12 @@ class TestPTY < Test::Unit::TestCase
) { master.readpartial(10) }
}
end
+
+ def test_getpty_nonexistent
+ bug3672 = '[ruby-dev:41965]'
+ Dir.mktmpdir do |tmpdir|
+ assert_raise(Errno::ENOENT, bug3672) {PTY.getpty(File.join(tmpdir, "no-such-command"))}
+ end
+ end
end if defined? PTY