aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_find.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_find.rb')
-rw-r--r--test/test_find.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_find.rb b/test/test_find.rb
index 7e9f21fdd4..6f61dd4f38 100644
--- a/test/test_find.rb
+++ b/test/test_find.rb
@@ -127,6 +127,15 @@ class TestFind < Test::Unit::TestCase
}
end
+ def test_dangling_symlink_stat_error
+ Dir.mktmpdir {|d|
+ File.symlink("foo", "#{d}/bar")
+ assert_raise(Errno::ENOENT) {
+ Find.find(d) {|f| File.stat(f) }
+ }
+ }
+ end
+
def test_enumerator
Dir.mktmpdir {|d|
File.open("#{d}/a", "w")