diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-02 21:14:51 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-02 21:14:51 +0000 |
commit | 185e9705abbb8c2f96e748a400b76db61e129902 (patch) | |
tree | 1223c8232d3d170e9c140c32ec3a43079673f307 /test/test_pty.rb | |
parent | d878c51357f6a0e72271b6d0299480711b70701a (diff) |
* ext/pty/pty.c (chfunc): restore errno from SystemCallError and
propagate proper exception to the parent. [ruby-dev:41965]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_pty.rb')
-rw-r--r-- | test/test_pty.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_pty.rb b/test/test_pty.rb index 1f0f8d6b31..dff025686d 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 |