##// END OF EJS Templates
Fix: Unable to run unit and functional tests if git binary is not available....
Jean-Philippe Lang -
r9678:2311f80c5dd1
parent child
Show More
@@ -29,16 +29,6 class RepositoriesGitControllerTest < ActionController::TestCase
29 CHAR_1_HEX = "\xc3\x9c"
29 CHAR_1_HEX = "\xc3\x9c"
30 NUM_REV = 28
30 NUM_REV = 28
31
31
32 ## Ruby uses ANSI api to fork a process on Windows.
33 ## Japanese Shift_JIS and Traditional Chinese Big5 have 0x5c(backslash) problem
34 ## and these are incompatible with ASCII.
35 ## Git for Windows (msysGit) changed internal API from ANSI to Unicode in 1.7.10
36 ## http://code.google.com/p/msysgit/issues/detail?id=80
37 ## So, Latin-1 path tests fail on Japanese Windows
38 WINDOWS_PASS = (Redmine::Platform.mswin? &&
39 Redmine::Scm::Adapters::GitAdapter.client_version_above?([1, 7, 10]))
40 WINDOWS_SKIP_STR = "TODO: This test fails in Git for Windows above 1.7.10"
41
42 ## Git, Mercurial and CVS path encodings are binary.
32 ## Git, Mercurial and CVS path encodings are binary.
43 ## Subversion supports URL encoding for path.
33 ## Subversion supports URL encoding for path.
44 ## Redmine Mercurial adapter and extension use URL encoding.
34 ## Redmine Mercurial adapter and extension use URL encoding.
@@ -97,6 +87,16 class RepositoriesGitControllerTest < ActionController::TestCase
97 end
87 end
98
88
99 if File.directory?(REPOSITORY_PATH)
89 if File.directory?(REPOSITORY_PATH)
90 ## Ruby uses ANSI api to fork a process on Windows.
91 ## Japanese Shift_JIS and Traditional Chinese Big5 have 0x5c(backslash) problem
92 ## and these are incompatible with ASCII.
93 ## Git for Windows (msysGit) changed internal API from ANSI to Unicode in 1.7.10
94 ## http://code.google.com/p/msysgit/issues/detail?id=80
95 ## So, Latin-1 path tests fail on Japanese Windows
96 WINDOWS_PASS = (Redmine::Platform.mswin? &&
97 Redmine::Scm::Adapters::GitAdapter.client_version_above?([1, 7, 10]))
98 WINDOWS_SKIP_STR = "TODO: This test fails in Git for Windows above 1.7.10"
99
100 def test_get_new
100 def test_get_new
101 @request.session[:user_id] = 1
101 @request.session[:user_id] = 1
102 @project.repository.destroy
102 @project.repository.destroy
@@ -31,16 +31,6 class RepositoryGitTest < ActiveSupport::TestCase
31 FELIX_HEX = "Felix Sch\xC3\xA4fer"
31 FELIX_HEX = "Felix Sch\xC3\xA4fer"
32 CHAR_1_HEX = "\xc3\x9c"
32 CHAR_1_HEX = "\xc3\x9c"
33
33
34 ## Ruby uses ANSI api to fork a process on Windows.
35 ## Japanese Shift_JIS and Traditional Chinese Big5 have 0x5c(backslash) problem
36 ## and these are incompatible with ASCII.
37 ## Git for Windows (msysGit) changed internal API from ANSI to Unicode in 1.7.10
38 ## http://code.google.com/p/msysgit/issues/detail?id=80
39 ## So, Latin-1 path tests fail on Japanese Windows
40 WINDOWS_PASS = (Redmine::Platform.mswin? &&
41 Redmine::Scm::Adapters::GitAdapter.client_version_above?([1, 7, 10]))
42 WINDOWS_SKIP_STR = "TODO: This test fails in Git for Windows above 1.7.10"
43
44 ## Git, Mercurial and CVS path encodings are binary.
34 ## Git, Mercurial and CVS path encodings are binary.
45 ## Subversion supports URL encoding for path.
35 ## Subversion supports URL encoding for path.
46 ## Redmine Mercurial adapter and extension use URL encoding.
36 ## Redmine Mercurial adapter and extension use URL encoding.
@@ -89,6 +79,16 class RepositoryGitTest < ActiveSupport::TestCase
89 end
79 end
90
80
91 if File.directory?(REPOSITORY_PATH)
81 if File.directory?(REPOSITORY_PATH)
82 ## Ruby uses ANSI api to fork a process on Windows.
83 ## Japanese Shift_JIS and Traditional Chinese Big5 have 0x5c(backslash) problem
84 ## and these are incompatible with ASCII.
85 ## Git for Windows (msysGit) changed internal API from ANSI to Unicode in 1.7.10
86 ## http://code.google.com/p/msysgit/issues/detail?id=80
87 ## So, Latin-1 path tests fail on Japanese Windows
88 WINDOWS_PASS = (Redmine::Platform.mswin? &&
89 Redmine::Scm::Adapters::GitAdapter.client_version_above?([1, 7, 10]))
90 WINDOWS_SKIP_STR = "TODO: This test fails in Git for Windows above 1.7.10"
91
92 def test_scm_available
92 def test_scm_available
93 klass = Repository::Git
93 klass = Repository::Git
94 assert_equal "Git", klass.scm_name
94 assert_equal "Git", klass.scm_name
General Comments 0
You need to be logged in to leave comments. Login now