diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-26 08:11:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-26 08:11:58 +0000 |
commit | e0cc69b74e99dd1f8ce4d9b92c255a2205fefaa4 (patch) | |
tree | 68b0e2f66531b69d7154522c87b173652bd6bb97 | |
parent | 8e6259e0d91f83439802f0d0fa1f4c56c2999f96 (diff) | |
download | ruby-e0cc69b74e99dd1f8ce4d9b92c255a2205fefaa4.tar.gz |
test_fileutils.rb: improve my_rm_rf
* test/fileutils/test_fileutils.rb (my_rm_rf): get rid of special
chars and remove by rmdir on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/fileutils/test_fileutils.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 295fbfd960..5f1cc41e3a 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -123,7 +123,9 @@ class TestFileUtils < Test::Unit::TestCase def my_rm_rf(path) if File.exist?('/bin/rm') - system %Q[/bin/rm -rf "#{path}"] + system "/bin/rm", "-rf", path + elsif /mswin|mingw/ =~ RUBY_PLATFORM + system "rmdir", "/q/s", path.gsub('/', '\\'), err: IO::NULL else FileUtils.rm_rf path end |