aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_file_exhaustive.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_file_exhaustive.rb')
-rw-r--r--test/ruby/test_file_exhaustive.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index 3e030309b6..4538cf3b61 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -399,6 +399,13 @@ class TestFileExhaustive < Test::Unit::TestCase
assert_file.not_zero?(nofile)
end
+ def test_empty_p
+ assert_nothing_raised { File.empty?(@dir) }
+ assert_file.not_empty?(regular_file)
+ assert_file.empty?(zerofile)
+ assert_file.not_empty?(nofile)
+ end
+
def test_size_p
assert_nothing_raised { File.size?(@dir) }
assert_equal(3, File.size?(regular_file))