summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-17 15:16:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-02-17 15:16:37 +0000
commite4809b056c1a37b51b4d2155f218f07b0147d29a (patch)
treeef04ddc09b2cc801c34f24c8867cee31493b7697 /test/ruby
parentbe9699a250b34dcaeb76d3dbba92ff484a81315b (diff)
test_dir.rb: Dir.empty? with directories
* test/ruby/test_dir.rb (test_empty): check with directories. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_dir.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb
index f976dbb..2685bea 100644
--- a/test/ruby/test_dir.rb
+++ b/test/ruby/test_dir.rb
@@ -342,6 +342,10 @@ class TestDir < Test::Unit::TestCase
assert_not_send([Dir, :empty?, a])
File.delete(tmp)
assert_send([Dir, :empty?, a])
+ Dir.mkdir(tmp)
+ assert_not_send([Dir, :empty?, a])
+ Dir.rmdir(tmp)
+ assert_send([Dir, :empty?, a])
end
assert_raise(Errno::ENOENT) {Dir.empty?(@nodir)}
assert_not_send([Dir, :empty?, File.join(@root, "b")])