##// END OF EJS Templates
scm: git: skip non UTF-8 path encoding test of functional test in JRuby (#5251)....
Toshi MARUYAMA -
r5883:4690082157c0
parent child
Show More
@@ -30,6 +30,14 class RepositoriesGitControllerTest < ActionController::TestCase
30 PRJ_ID = 3
30 PRJ_ID = 3
31 CHAR_1_HEX = "\xc3\x9c"
31 CHAR_1_HEX = "\xc3\x9c"
32
32
33 ## Git, Mercurial and CVS path encodings are binary.
34 ## Subversion supports URL encoding for path.
35 ## Redmine Mercurial adapter and extension use URL encoding.
36 ## Git accepts only binary path in command line parameter.
37 ## So, there is no way to use binary command line parameter in JRuby.
38 JRUBY_SKIP = (RUBY_PLATFORM == 'java')
39 JRUBY_SKIP_STR = "TODO: This test fails in JRuby"
40
33 def setup
41 def setup
34 @ruby19_non_utf8_pass =
42 @ruby19_non_utf8_pass =
35 (RUBY_VERSION >= '1.9' && Encoding.default_external.to_s != 'UTF-8')
43 (RUBY_VERSION >= '1.9' && Encoding.default_external.to_s != 'UTF-8')
@@ -155,6 +163,8 class RepositoriesGitControllerTest < ActionController::TestCase
155 def test_entry_show_latin_1
163 def test_entry_show_latin_1
156 if @ruby19_non_utf8_pass
164 if @ruby19_non_utf8_pass
157 puts_ruby19_non_utf8_pass()
165 puts_ruby19_non_utf8_pass()
166 elsif JRUBY_SKIP
167 puts JRUBY_SKIP_STR
158 else
168 else
159 with_settings :repositories_encodings => 'UTF-8,ISO-8859-1' do
169 with_settings :repositories_encodings => 'UTF-8,ISO-8859-1' do
160 ['57ca437c', '57ca437c0acbbcb749821fdf3726a1367056d364'].each do |r1|
170 ['57ca437c', '57ca437c0acbbcb749821fdf3726a1367056d364'].each do |r1|
@@ -303,6 +313,8 class RepositoriesGitControllerTest < ActionController::TestCase
303 def test_annotate_latin_1
313 def test_annotate_latin_1
304 if @ruby19_non_utf8_pass
314 if @ruby19_non_utf8_pass
305 puts_ruby19_non_utf8_pass()
315 puts_ruby19_non_utf8_pass()
316 elsif JRUBY_SKIP
317 puts JRUBY_SKIP_STR
306 else
318 else
307 with_settings :repositories_encodings => 'UTF-8,ISO-8859-1' do
319 with_settings :repositories_encodings => 'UTF-8,ISO-8859-1' do
308 ['57ca437c', '57ca437c0acbbcb749821fdf3726a1367056d364'].each do |r1|
320 ['57ca437c', '57ca437c0acbbcb749821fdf3726a1367056d364'].each do |r1|
General Comments 0
You need to be logged in to leave comments. Login now