mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	merge from trunk (r28019)
* test/test_tempfile.rb: skip some tests on Windows because unlinking is always delayed till closed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									9dae7d94f9
								
							
						
					
					
						commit
						1ea31179fe
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -86,6 +86,7 @@ class TestTempfile < Test::Unit::TestCase
 | 
			
		|||
  end
 | 
			
		||||
 | 
			
		||||
  def test_unlink_before_close_works_on_posix_systems
 | 
			
		||||
    skip "on Windows, unlink is always delayed" if /mswin|mingw/ =~ RUBY_PLATFORM
 | 
			
		||||
    tempfile = tempfile("foo")
 | 
			
		||||
    begin
 | 
			
		||||
      path = tempfile.path
 | 
			
		||||
| 
						 | 
				
			
			@ -118,6 +119,7 @@ class TestTempfile < Test::Unit::TestCase
 | 
			
		|||
  end
 | 
			
		||||
 | 
			
		||||
  def test_close_with_unlink_now_true_does_not_unlink_if_already_unlinked
 | 
			
		||||
    skip "on Windows, unlink is always delayed" if /mswin|mingw/ =~ RUBY_PLATFORM
 | 
			
		||||
    t = tempfile("foo")
 | 
			
		||||
    path = t.path
 | 
			
		||||
    t.unlink
 | 
			
		||||
| 
						 | 
				
			
			@ -140,6 +142,7 @@ class TestTempfile < Test::Unit::TestCase
 | 
			
		|||
  end
 | 
			
		||||
 | 
			
		||||
  def test_close_bang_does_not_unlink_if_already_unlinked
 | 
			
		||||
    skip "on Windows, unlink is always delayed" if /mswin|mingw/ =~ RUBY_PLATFORM
 | 
			
		||||
    t = tempfile("foo")
 | 
			
		||||
    path = t.path
 | 
			
		||||
    t.unlink
 | 
			
		||||
| 
						 | 
				
			
			@ -153,6 +156,7 @@ class TestTempfile < Test::Unit::TestCase
 | 
			
		|||
  end
 | 
			
		||||
 | 
			
		||||
  def test_finalizer_does_not_unlink_if_already_unlinked
 | 
			
		||||
    skip "on Windows, unlink is always delayed" if /mswin|mingw/ =~ RUBY_PLATFORM
 | 
			
		||||
    assert_in_out_err('-rtempfile', <<-'EOS') do |(filename,*), (error,*)|
 | 
			
		||||
file = Tempfile.new('foo')
 | 
			
		||||
path = file.path
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue