Merged r6005 from trunk.

scm: git: skip non UTF-8 path encoding test of unit model 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@6452 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA committed 2011-08-17 08:16:23 +00:00
1 parent b6dbf26c86
commit 90f83db148
1 file changed
+14
+14
View File
@@ -33,6 +33,14 @@ class RepositoryGitTest < ActiveSupport::TestCase
# WINDOWS_PASS = Redmine::Platform.mswin? # WINDOWS_PASS = Redmine::Platform.mswin?
WINDOWS_PASS = false 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) if File.directory?(REPOSITORY_PATH)
def setup def setup
klass = Repository::Git klass = Repository::Git
@@ -308,6 +316,9 @@ class RepositoryGitTest < ActiveSupport::TestCase
'61b685fbe55ab05b5ac68402d5720c1a6ac973d1', '61b685fbe55ab05b5ac68402d5720c1a6ac973d1',
], changesets.collect(&:revision) ], changesets.collect(&:revision)
if JRUBY_SKIP
puts JRUBY_SKIP_STR
else
# latin-1 encoding path # latin-1 encoding path
changesets = @repository.latest_changesets( changesets = @repository.latest_changesets(
"latin-1-dir/test-#{@char_1}-2.txt", '64f1f3e89') "latin-1-dir/test-#{@char_1}-2.txt", '64f1f3e89')
@@ -322,10 +333,13 @@ class RepositoryGitTest < ActiveSupport::TestCase
'64f1f3e89ad1cb57976ff0ad99a107012ba3481d', '64f1f3e89ad1cb57976ff0ad99a107012ba3481d',
], changesets.collect(&:revision) ], changesets.collect(&:revision)
end end
end
def test_latest_changesets_latin_1_dir def test_latest_changesets_latin_1_dir
if WINDOWS_PASS if WINDOWS_PASS
# #
elsif JRUBY_SKIP
puts JRUBY_SKIP_STR
else else
@repository.fetch_changesets @repository.fetch_changesets
@repository.reload @repository.reload