]> source.dussan.org Git - redmine.git/commitdiff
scm: git: unit model latin-1 path encoding test passes on Japanese Windows (#5251).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 9 Mar 2011 04:14:17 +0000 (04:14 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 9 Mar 2011 04:14:17 +0000 (04:14 +0000)
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

index 39503e099be59d236fdb2eeb51df5ee2108fb688..d5ca25b8b72d8fe7f3cfa810ce5c9389dc0f2c5e 100644 (file)
@@ -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.\r
+  ## Japanese Shift_JIS and Traditional Chinese Big5 have 0x5c(backslash) problem\r
+  ## and these are incompatible with ASCII.\r
+  # WINDOWS_PASS = Redmine::Platform.mswin?\r
+  WINDOWS_PASS = false\r
+
   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