summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fileutils/test_fileutils.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb
index 500c47b56c..4ccea53e95 100644
--- a/test/fileutils/test_fileutils.rb
+++ b/test/fileutils/test_fileutils.rb
@@ -1812,6 +1812,14 @@ class TestFileUtils < Test::Unit::TestCase
assert_file_not_exist 'data/tmpdir'
end if have_file_perm?
+ def test_remove_dir_with_file
+ File.write('data/tmpfile', 'dummy')
+ assert_raise(Errno::ENOTDIR) { remove_dir 'data/tmpfile' }
+ assert_file_exist 'data/tmpfile'
+ ensure
+ File.unlink('data/tmpfile') if File.exist?('data/tmpfile')
+ end
+
def test_compare_file
check_singleton :compare_file
# FIXME