]> source.dussan.org Git - redmine.git/commitdiff
Merged r6004 from trunk.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 17 Aug 2011 08:16:02 +0000 (08:16 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 17 Aug 2011 08:16:02 +0000 (08:16 +0000)
scm: git: skip non UTF-8 path encoding test of unit adapter test in JRuby.

Git, Mercurial and CVS path encodings are binary.
Subversion supports URL encoding for path.
Redmine Mercurial adapter and extension use URL encoding.
Git accepts only binary path in command line parameter.
So, there is no way to use binary command line parameter in JRuby.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.2-stable@6451 e93f8b46-1217-0410-a6f0-8f06a7374b81

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

index 42cc78071cd91e07510cd2d09b9982f0a5d56a1c..2c7fd89c38369d3263c8cde1dd81f98cf4a295cd 100644 (file)
@@ -20,6 +20,14 @@ begin
     # WINDOWS_PASS = Redmine::Platform.mswin?
     WINDOWS_PASS = false
 
+    ## Git, Mercurial and CVS path encodings are binary.
+    ## Subversion supports URL encoding for path.
+    ## Redmine Mercurial adapter and extension use URL encoding.
+    ## Git accepts only binary path in command line parameter.
+    ## So, there is no way to use binary command line parameter in JRuby.
+    JRUBY_SKIP     = (RUBY_PLATFORM == 'java')
+    JRUBY_SKIP_STR = "TODO: This test fails in JRuby"
+
     if File.directory?(REPOSITORY_PATH)
       def setup
         adapter_class = Redmine::Scm::Adapters::GitAdapter
@@ -262,6 +270,8 @@ begin
       def test_latin_1_path
         if WINDOWS_PASS
           #
+        elsif JRUBY_SKIP
+          puts JRUBY_SKIP_STR
         else
           p2 = "latin-1-dir/test-#{@char_1}-2.txt"
           ['4fc55c43bf3d3dc2efb66145365ddc17639ce81e', '4fc55c43bf3'].each do |r1|
@@ -322,6 +332,8 @@ begin
       def test_entries_latin_1_dir
         if WINDOWS_PASS
           #
+        elsif JRUBY_SKIP
+          puts JRUBY_SKIP_STR
         else
           entries1 = @adapter.entries("latin-1-dir/test-#{@char_1}-subdir",
                                       '1ca7f5ed')