1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/fileutils/test_fileutils.rb: should not create any

files or directories in current directory.  [ruby-talk:88724]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2003-12-24 02:26:44 +00:00
parent c2b63d249f
commit 52975bb7a7
2 changed files with 18 additions and 1 deletions

View file

@ -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> Wed Dec 24 10:29:53 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/stringio/stringio.c (strio_read): never return nil at * ext/stringio/stringio.c (strio_read): never return nil at

View file

@ -10,6 +10,15 @@ require 'pathname'
require 'tmpdir' require 'tmpdir'
require 'test/unit' 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? def have_drive_letter?
/djgpp|mswin(?!ce)|mingw|bcc|emx/ === RUBY_PLATFORM /djgpp|mswin(?!ce)|mingw|bcc|emx/ === RUBY_PLATFORM
end end
@ -44,7 +53,10 @@ def have_hardlink?
HAVE_HARDLINK HAVE_HARDLINK
end end
class TestFileUtils < Test::Unit::TestCase Dir.chdir prevdir
Dir.rmdir tmproot
class TestFileUtils
include FileUtils include FileUtils