summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-05-25 07:46:38 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-05-25 07:46:38 +0000
commit58820a1e902af29a726b7135f38811fcd5e4e2ed (patch)
treed113d4a97d0517fbc9d9fa12729ade5ba2cfd09e /test
parent05b292030ca67b3ca6a6db1a39903a098380fb9a (diff)
downloadredmine-58820a1e902af29a726b7135f38811fcd5e4e2ed.tar.gz
redmine-58820a1e902af29a726b7135f38811fcd5e4e2ed.zip
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
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb18
1 files changed, 18 insertions, 0 deletions
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)