From c9a3d925ca534bcd200505b65b99f1c64a461abf Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 21 May 2011 02:38:56 +0000 Subject: [PATCH] scm: mercurial: add unit adapter test of default path_encoding is UTF-8 (#2664). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5869 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../scm/adapters/mercurial_adapter_test.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb index 8fe4e2540..99315dfd1 100644 --- a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb @@ -332,6 +332,21 @@ begin end end + def test_path_encoding_default_utf8 + adpt1 = Redmine::Scm::Adapters::MercurialAdapter.new( + REPOSITORY_PATH + ) + assert_equal "UTF-8", adpt1.path_encoding + adpt2 = Redmine::Scm::Adapters::MercurialAdapter.new( + REPOSITORY_PATH, + nil, + nil, + nil, + "" + ) + assert_equal "UTF-8", adpt2.path_encoding + end + private def test_hgversion_for(hgversion, version)