aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/pathname_test.rb
blob: 01de67251b9dd5307847de45d05eb4b3916ae9ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
require 'abstract_unit'
require 'active_support/core_ext/pathname'

class TestPathname < Test::Unit::TestCase
  def test_clean_within
    assert_equal "Hi", Pathname.clean_within("Hi")
    assert_equal "Hi", Pathname.clean_within("Hi/a/b/../..")
    assert_equal "Hello\nWorld", Pathname.clean_within("Hello/a/b/../..\na/b/../../World/c/..")
  end
end