diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-24 02:26:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-24 02:26:44 +0000 |
commit | c107984009f575f5988ca02274195d6da411e6c1 (patch) | |
tree | 8a654d18ff8e0fe66de527d0fc4b4b418562ad0e | |
parent | 3aaeab24d258c7a49c6765afe064720b782d8e3c (diff) | |
download | ruby-c107984009f575f5988ca02274195d6da411e6c1.tar.gz ruby-c107984009f575f5988ca02274195d6da411e6c1.tar.xz ruby-c107984009f575f5988ca02274195d6da411e6c1.zip |
* test/fileutils/test_fileutils.rb: should not create any
files or directories in current directory. [ruby-talk:88724]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/fileutils/test_fileutils.rb | 14 |
2 files changed, 18 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Dec 24 11:26:41 2003 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * test/fileutils/test_fileutils.rb: should not create any + files or directories in current directory. [ruby-talk:88724] + Wed Dec 24 10:29:53 2003 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/stringio/stringio.c (strio_read): never return nil at diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 03d4f1a1b..90a496124 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -10,6 +10,15 @@ require 'pathname' require 'tmpdir' require 'test/unit' +class TestFileUtils < Test::Unit::TestCase + TMPROOT = "#{Dir.tmpdir}/fileutils.rb.#{$$}" +end + +prevdir = Dir.pwd +tmproot = TestFileUtils::TMPROOT +Dir.mkdir tmproot unless File.directory?(tmproot) +Dir.chdir tmproot + def have_drive_letter? /djgpp|mswin(?!ce)|mingw|bcc|emx/ === RUBY_PLATFORM end @@ -44,7 +53,10 @@ def have_hardlink? HAVE_HARDLINK end -class TestFileUtils < Test::Unit::TestCase +Dir.chdir prevdir +Dir.rmdir tmproot + +class TestFileUtils include FileUtils |