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

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5891 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-05-25 07:46:38 +00:00
parent 05b292030c
commit 58820a1e90
1 changed files with 18 additions and 0 deletions

View File

@ -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)