mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									fb1d5520fa
								
							
						
					
					
						commit
						09492b5ab2
					
				
					 1 changed files with 18 additions and 0 deletions
				
			
		|  | @ -105,5 +105,23 @@ class TestPTY < Test::Unit::TestCase | |||
|       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 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 akr
						akr