diff options
Diffstat (limited to 'test/test_find.rb')
-rw-r--r-- | test/test_find.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_find.rb b/test/test_find.rb index d0e92067f1..e3663e47b2 100644 --- a/test/test_find.rb +++ b/test/test_find.rb @@ -12,6 +12,17 @@ class TestFind < Test::Unit::TestCase } end + def test_nonexistence + bug12087 = '[ruby-dev:49497] [Bug #12087]' + Dir.mktmpdir {|d| + path = "#{d}/a" + re = /#{Regexp.quote(path)}\z/ + assert_raise_with_message(Errno::ENOENT, re, bug12087) { + Find.find(path) {} + } + } + end + def test_rec Dir.mktmpdir {|d| File.open("#{d}/a", "w"){} |