]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: add unit adapter test of default path_encoding is UTF-8 (#2664).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 21 May 2011 02:38:56 +0000 (02:38 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 21 May 2011 02:38:56 +0000 (02:38 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5869 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb

index 8fe4e25404fd3dff6a621ee048ab2a5f49663287..99315dfd1985e15aa670912d9608daaecabfd899 100644 (file)
@@ -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)