blob: 3f49b665b2aea8570c32d96262443e0c76139c55 (
plain) (
tree)
|
|
require 'test/unit'
require File.dirname(__FILE__) + '/../../lib/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
|