From 58820a1e902af29a726b7135f38811fcd5e4e2ed Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 25 May 2011 07:46:38 +0000 Subject: [PATCH] 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 --- .../scm/adapters/bazaar_adapter_test.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb index b88124c6a..23a74314f 100644 --- a/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb @@ -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) -- 2.39.5