Commit 3a444de8 authored by tmaruyama's avatar tmaruyama

scm: bazaar: add unit adapter test to get .bzr/branch/branch.conf path from...

scm: bazaar: add unit adapter test to get .bzr/branch/branch.conf path from specified path (#2799, #4741, #8030).

git-svn-id: https://svn.redmine.org/redmine/trunk@5891 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 81c9e049
......@@ -34,6 +34,24 @@ begin
assert_equal 'mkdir', annotate.lines[0]
end
def test_branch_conf_path
p = "c:\\test\\test\\"
bcp = Redmine::Scm::Adapters::BazaarAdapter.branch_conf_path(p)
assert_equal File.join("c:\\test\\test", ".bzr", "branch", "branch.conf"), bcp
p = "c:\\test\\test\\.bzr"
bcp = Redmine::Scm::Adapters::BazaarAdapter.branch_conf_path(p)
assert_equal File.join("c:\\test\\test", ".bzr", "branch", "branch.conf"), bcp
p = "c:\\test\\test\\.bzr\\"
bcp = Redmine::Scm::Adapters::BazaarAdapter.branch_conf_path(p)
assert_equal File.join("c:\\test\\test", ".bzr", "branch", "branch.conf"), bcp
p = "c:\\test\\test"
bcp = Redmine::Scm::Adapters::BazaarAdapter.branch_conf_path(p)
assert_equal File.join("c:\\test\\test", ".bzr", "branch", "branch.conf"), bcp
p = "\\\\server\\test\\test\\"
bcp = Redmine::Scm::Adapters::BazaarAdapter.branch_conf_path(p)
assert_equal File.join("\\\\server\\test\\test", ".bzr", "branch", "branch.conf"), bcp
end
private
def test_scm_version_for(scm_command_version, version)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment