Skip to content

Commit

Permalink
Add explict test for File.realpath file => dir conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
herwinw authored and eregon committed Aug 28, 2023
1 parent 7c08adf commit ab0932c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/file/realpath_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
File.realpath(@relative_symlink).should == @file
end

it "removes the file element when going one level up" do
File.realpath('../', @file).should == @real_dir
end

it "raises an Errno::ELOOP if the symlink points to itself" do
File.unlink @link
File.symlink(@link, @link)
Expand Down

0 comments on commit ab0932c

Please sign in to comment.