ruby-changes:15000
From: akr <ko1@a...>
Date: Thu, 11 Mar 2010 22:39:51 +0900 (JST)
Subject: [ruby-changes:15000] Ruby:r26875 (trunk): add tests.
akr 2010-03-11 22:39:42 +0900 (Thu, 11 Mar 2010) New Revision: 26875 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26875 Log: add tests. Modified files: trunk/test/test_pty.rb Index: test/test_pty.rb =================================================================== --- test/test_pty.rb (revision 26874) +++ test/test_pty.rb (revision 26875) @@ -105,5 +105,23 @@ assert_equal(0600, s.mode & 0777) } end + + def test_close_master + PTY.open {|master, slave| + master.close + assert_raise(EOFError) { slave.readpartial(10) } + } + end + + def test_close_slave + PTY.open {|master, slave| + slave.close + # This exception is platform dependent. + assert_raise( + EOFError, # FreeBSD + Errno::EIO # GNU/Linux + ) { master.readpartial(10) } + } + end end if defined? PTY -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/