From 7989a0868d6a5231bfbed846eb84d99c7514939a Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 24 Oct 2007 07:11:35 +0000 Subject: [PATCH] specify prefix for Dir.mktmpdir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/pathname/test_pathname.rb | 2 +- test/ruby/test_dir.rb | 2 +- test/ruby/test_file.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb index 9bc780f6d3..4c9c9e1e52 100644 --- a/test/pathname/test_pathname.rb +++ b/test/pathname/test_pathname.rb @@ -287,7 +287,7 @@ class TestPathname < Test::Unit::TestCase return rescue TypeError end - Dir.mktmpdir {|dir| + Dir.mktmpdir('rubytest-pathname') {|dir| File.symlink("not-exist-target", "#{dir}/not-exist") assert_raise(Errno::ENOENT) { realpath("#{dir}/not-exist") } File.symlink("loop", "#{dir}/loop") diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb index e3a24e8583..10c4a04fed 100644 --- a/test/ruby/test_dir.rb +++ b/test/ruby/test_dir.rb @@ -6,7 +6,7 @@ require 'fileutils' class TestDir < Test::Unit::TestCase def setup - @root = Dir.mktmpdir + @root = Dir.mktmpdir('__test_dir__') for i in ?a..?z if i.ord % 2 == 0 FileUtils.touch(File.join(@root, i)) diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb index 49203ab2ea..46163fb8f7 100644 --- a/test/ruby/test_file.rb +++ b/test/ruby/test_file.rb @@ -7,7 +7,7 @@ class TestFile < Test::Unit::TestCase # I don't know Ruby's spec about "unlink-before-close" exactly. # This test asserts current behaviour. def test_unlink_before_close - Dir.mktmpdir {|tmpdir| + Dir.mktmpdir('rubytest-file') {|tmpdir| filename = tmpdir + '/' + File.basename(__FILE__) + ".#{$$}" w = File.open(filename, "w") w << "foo"