require 'helper' require 'kvm/subversion' class TestSubversion < Test::Unit::TestCase def test_url_mangling_with_path assert_equal "foo__a_b_c", KVM::Subversion.checkout_dirname("foo", "a/b/c") end def test_url_mangling_without_path assert_equal "foo__trunk", KVM::Subversion.checkout_dirname("foo") end def test_checkout_path_with_path assert_equal "/tmp/foo__a_b_c", KVM::Subversion.checkout_path("/fakey/mc/fake/../../../tmp", "foo", "a/b/c") end def test_checkout_path_without_path assert_equal "/tmp/foo__trunk", KVM::Subversion.checkout_path("/fakey/mc/fake/../../../tmp", "foo") end end