From b235e3694628088b57681bffdce1a6ab438ade94 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 9 Mar 2011 04:14:17 +0000 Subject: [PATCH] scm: git: unit model latin-1 path encoding test passes on Japanese Windows (#5251). Ruby uses ANSI api to fork a process on Windows. Japanese Shift_JIS and Traditional Chinese Big5 have 0x5c(backslash) problem and these are incompatible with ASCII. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5072 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/repository_git_test.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/unit/repository_git_test.rb b/test/unit/repository_git_test.rb index 39503e099..d5ca25b8b 100644 --- a/test/unit/repository_git_test.rb +++ b/test/unit/repository_git_test.rb @@ -27,6 +27,12 @@ class RepositoryGitTest < ActiveSupport::TestCase FELIX_HEX = "Felix Sch\xC3\xA4fer" CHAR_1_HEX = "\xc3\x9c" + ## Ruby uses ANSI api to fork a process on Windows. + ## Japanese Shift_JIS and Traditional Chinese Big5 have 0x5c(backslash) problem + ## and these are incompatible with ASCII. + # WINDOWS_PASS = Redmine::Platform.mswin? + WINDOWS_PASS = false + def setup @project = Project.find(3) @repository = Repository::Git.create( @@ -41,7 +47,7 @@ class RepositoryGitTest < ActiveSupport::TestCase end end - if File.directory?(REPOSITORY_PATH) + if File.directory?(REPOSITORY_PATH) def test_fetch_changesets_from_scratch @repository.fetch_changesets @repository.reload @@ -198,8 +204,8 @@ class RepositoryGitTest < ActiveSupport::TestCase end def test_latest_changesets_latin_1_dir - if Redmine::Platform.mswin? - # TODO + if WINDOWS_PASS + # else @repository.fetch_changesets @repository.reload -- 2.39.5