Fix: Unable to run unit and functional tests if git binary is not available.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9861 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
f62507dae5
commit
2311f80c5d
|
@ -29,16 +29,6 @@ class RepositoriesGitControllerTest < ActionController::TestCase
|
||||||
CHAR_1_HEX = "\xc3\x9c"
|
CHAR_1_HEX = "\xc3\x9c"
|
||||||
NUM_REV = 28
|
NUM_REV = 28
|
||||||
|
|
||||||
## 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 for Windows (msysGit) changed internal API from ANSI to Unicode in 1.7.10
|
|
||||||
## http://code.google.com/p/msysgit/issues/detail?id=80
|
|
||||||
## So, Latin-1 path tests fail on Japanese Windows
|
|
||||||
WINDOWS_PASS = (Redmine::Platform.mswin? &&
|
|
||||||
Redmine::Scm::Adapters::GitAdapter.client_version_above?([1, 7, 10]))
|
|
||||||
WINDOWS_SKIP_STR = "TODO: This test fails in Git for Windows above 1.7.10"
|
|
||||||
|
|
||||||
## Git, Mercurial and CVS path encodings are binary.
|
## Git, Mercurial and CVS path encodings are binary.
|
||||||
## Subversion supports URL encoding for path.
|
## Subversion supports URL encoding for path.
|
||||||
## Redmine Mercurial adapter and extension use URL encoding.
|
## Redmine Mercurial adapter and extension use URL encoding.
|
||||||
|
@ -97,6 +87,16 @@ class RepositoriesGitControllerTest < ActionController::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
if File.directory?(REPOSITORY_PATH)
|
if File.directory?(REPOSITORY_PATH)
|
||||||
|
## 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 for Windows (msysGit) changed internal API from ANSI to Unicode in 1.7.10
|
||||||
|
## http://code.google.com/p/msysgit/issues/detail?id=80
|
||||||
|
## So, Latin-1 path tests fail on Japanese Windows
|
||||||
|
WINDOWS_PASS = (Redmine::Platform.mswin? &&
|
||||||
|
Redmine::Scm::Adapters::GitAdapter.client_version_above?([1, 7, 10]))
|
||||||
|
WINDOWS_SKIP_STR = "TODO: This test fails in Git for Windows above 1.7.10"
|
||||||
|
|
||||||
def test_get_new
|
def test_get_new
|
||||||
@request.session[:user_id] = 1
|
@request.session[:user_id] = 1
|
||||||
@project.repository.destroy
|
@project.repository.destroy
|
||||||
|
|
|
@ -31,16 +31,6 @@ class RepositoryGitTest < ActiveSupport::TestCase
|
||||||
FELIX_HEX = "Felix Sch\xC3\xA4fer"
|
FELIX_HEX = "Felix Sch\xC3\xA4fer"
|
||||||
CHAR_1_HEX = "\xc3\x9c"
|
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.
|
|
||||||
## Git for Windows (msysGit) changed internal API from ANSI to Unicode in 1.7.10
|
|
||||||
## http://code.google.com/p/msysgit/issues/detail?id=80
|
|
||||||
## So, Latin-1 path tests fail on Japanese Windows
|
|
||||||
WINDOWS_PASS = (Redmine::Platform.mswin? &&
|
|
||||||
Redmine::Scm::Adapters::GitAdapter.client_version_above?([1, 7, 10]))
|
|
||||||
WINDOWS_SKIP_STR = "TODO: This test fails in Git for Windows above 1.7.10"
|
|
||||||
|
|
||||||
## Git, Mercurial and CVS path encodings are binary.
|
## Git, Mercurial and CVS path encodings are binary.
|
||||||
## Subversion supports URL encoding for path.
|
## Subversion supports URL encoding for path.
|
||||||
## Redmine Mercurial adapter and extension use URL encoding.
|
## Redmine Mercurial adapter and extension use URL encoding.
|
||||||
|
@ -89,6 +79,16 @@ class RepositoryGitTest < ActiveSupport::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
if File.directory?(REPOSITORY_PATH)
|
if File.directory?(REPOSITORY_PATH)
|
||||||
|
## 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 for Windows (msysGit) changed internal API from ANSI to Unicode in 1.7.10
|
||||||
|
## http://code.google.com/p/msysgit/issues/detail?id=80
|
||||||
|
## So, Latin-1 path tests fail on Japanese Windows
|
||||||
|
WINDOWS_PASS = (Redmine::Platform.mswin? &&
|
||||||
|
Redmine::Scm::Adapters::GitAdapter.client_version_above?([1, 7, 10]))
|
||||||
|
WINDOWS_SKIP_STR = "TODO: This test fails in Git for Windows above 1.7.10"
|
||||||
|
|
||||||
def test_scm_available
|
def test_scm_available
|
||||||
klass = Repository::Git
|
klass = Repository::Git
|
||||||
assert_equal "Git", klass.scm_name
|
assert_equal "Git", klass.scm_name
|
||||||
|
|
Loading…
Reference in New Issue