summaryrefslogtreecommitdiff
path: root/test/fileutils
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-26 08:11:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-26 08:11:58 +0000
commite0cc69b74e99dd1f8ce4d9b92c255a2205fefaa4 (patch)
tree68b0e2f66531b69d7154522c87b173652bd6bb97 /test/fileutils
parent8e6259e0d91f83439802f0d0fa1f4c56c2999f96 (diff)
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
Diffstat (limited to 'test/fileutils')
-rw-r--r--test/fileutils/test_fileutils.rb4
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