Skip to content

Commit

Permalink
realpath spec
Browse files Browse the repository at this point in the history
  • Loading branch information
ahorek committed Nov 16, 2015
1 parent 2fa5e5a commit c39825f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/jruby/test_file.rb
Expand Up @@ -208,6 +208,12 @@ def test_expand_path_windows
def test_pathname_windows
assert_equal(Pathname('foo.bar.rb').expand_path.relative_path_from(Pathname(Dir.pwd)), Pathname('foo.bar.rb'))
end

# JRUBY-3132
def test_realpath_windows
assert_equal('C:/', File.realpath('C:/'))
assert_equal('C:/', File.realpath('C:\\'))
end
else
def test_expand_path
assert_equal("/bin", File.expand_path("../../bin", "/foo/bar"))
Expand Down Expand Up @@ -430,6 +436,10 @@ def test_expand_path_corner_case
# this would fail on MRI 1.8.6 (MRI returns "/foo").
assert_equal("//foo", File.expand_path("../foo", "//bar"))
end

def test_realpath
assert_equal('/', File.realpath('/'))
end
end # if windows

def test_dirname
Expand Down

0 comments on commit c39825f

Please sign in to comment.