summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_dir.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb
index 81e047d385..1f782fd7dd 100644
--- a/test/ruby/test_dir.rb
+++ b/test/ruby/test_dir.rb
@@ -178,6 +178,11 @@ class TestDir < Test::Unit::TestCase
end
end
+ def test_entries
+ entries = Dir.open(@root) {|dir| dir.entries}
+ assert_equal(%w(. ..) + (?a..?z).to_a, entries.sort)
+ end
+
def test_foreach
assert_equal(%w(. ..) + (?a..?z).to_a, Dir.foreach(@root).to_a.sort)
end