summaryrefslogtreecommitdiffstats
path: root/test/unit/lib
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-03-09 04:13:58 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-03-09 04:13:58 +0000
commit74f44a5b6a0b8896b1cf4347021237566e93cf73 (patch)
tree5f15dcbe22a4fe9197ad96476af43b3be6fc4f84 /test/unit/lib
parentf9717c0bda9c6bdfa151b5e400b874eed725a0c3 (diff)
downloadredmine-74f44a5b6a0b8896b1cf4347021237566e93cf73.tar.gz
redmine-74f44a5b6a0b8896b1cf4347021237566e93cf73.zip
scm: git: unit adapter 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@5071 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/lib')
-rw-r--r--test/unit/lib/redmine/scm/adapters/git_adapter_test.rb17
1 files changed, 12 insertions, 5 deletions
diff --git a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb
index a85b1b86a..3e62f9984 100644
--- a/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb
+++ b/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb
@@ -14,6 +14,12 @@ begin
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
+
if File.directory?(REPOSITORY_PATH)
def setup
@adapter = Redmine::Scm::Adapters::GitAdapter.new(
@@ -138,8 +144,8 @@ begin
end
def test_latin_1_path
- if Redmine::Platform.mswin?
- # TODO
+ if WINDOWS_PASS
+ #
else
p2 = "latin-1-dir/test-#{@char_1}-2.txt"
['4fc55c43bf3d3dc2efb66145365ddc17639ce81e', '4fc55c43bf3'].each do |r1|
@@ -196,10 +202,11 @@ begin
end
def test_entries_latin_1_dir
- if Redmine::Platform.mswin?
- # TODO
+ if WINDOWS_PASS
+ #
else
- entries1 = @adapter.entries("latin-1-dir/test-#{@char_1}-subdir", '1ca7f5ed')
+ entries1 = @adapter.entries("latin-1-dir/test-#{@char_1}-subdir",
+ '1ca7f5ed')
assert entries1
assert_equal 3, entries1.size
f1 = entries1[1]