diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-02-28 19:07:17 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-02-28 19:07:17 +0100 |
commit | a0f5ff4c3cd05f8717be2bf1d79f0817f288d398 (patch) | |
tree | 441f409cf816cf8a61dacdbaf204ae9f5cbe2f18 /spec/ruby/core/file/stat_spec.rb | |
parent | 5d210501825e1682e68cbfc2be424fc339f382fa (diff) |
Update to ruby/spec@41bf282
Diffstat (limited to 'spec/ruby/core/file/stat_spec.rb')
-rw-r--r-- | spec/ruby/core/file/stat_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/core/file/stat_spec.rb b/spec/ruby/core/file/stat_spec.rb index 31f9dc58af..76b0becbf0 100644 --- a/spec/ruby/core/file/stat_spec.rb +++ b/spec/ruby/core/file/stat_spec.rb @@ -41,5 +41,14 @@ platform_is_not :windows do st.file?.should == true st.symlink?.should == false end + + it "returns an error when given missing non-ASCII path" do + missing_path = "/missingfilepath\xE3E4".force_encoding("ASCII-8BIT") + -> { + File.stat(missing_path) + }.should raise_error(Errno::ENOENT) { |e| + e.message.should include(missing_path) + } + end end end |