@@ -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') | |
@@ -157,6 +165,8 class RepositoriesGitControllerTest < ActionController::TestCase | |||||
157 | def test_entry_show_latin_1 |
|
165 | def test_entry_show_latin_1 | |
158 | if @ruby19_non_utf8_pass |
|
166 | if @ruby19_non_utf8_pass | |
159 | puts_ruby19_non_utf8_pass() |
|
167 | puts_ruby19_non_utf8_pass() | |
|
168 | elsif JRUBY_SKIP | |||
|
169 | puts JRUBY_SKIP_STR | |||
160 | else |
|
170 | else | |
161 | with_settings :repositories_encodings => 'UTF-8,ISO-8859-1' do |
|
171 | with_settings :repositories_encodings => 'UTF-8,ISO-8859-1' do | |
162 | ['57ca437c', '57ca437c0acbbcb749821fdf3726a1367056d364'].each do |r1| |
|
172 | ['57ca437c', '57ca437c0acbbcb749821fdf3726a1367056d364'].each do |r1| | |
@@ -313,6 +323,8 class RepositoriesGitControllerTest < ActionController::TestCase | |||||
313 | def test_annotate_latin_1 |
|
323 | def test_annotate_latin_1 | |
314 | if @ruby19_non_utf8_pass |
|
324 | if @ruby19_non_utf8_pass | |
315 | puts_ruby19_non_utf8_pass() |
|
325 | puts_ruby19_non_utf8_pass() | |
|
326 | elsif JRUBY_SKIP | |||
|
327 | puts JRUBY_SKIP_STR | |||
316 | else |
|
328 | else | |
317 | with_settings :repositories_encodings => 'UTF-8,ISO-8859-1' do |
|
329 | with_settings :repositories_encodings => 'UTF-8,ISO-8859-1' do | |
318 | ['57ca437c', '57ca437c0acbbcb749821fdf3726a1367056d364'].each do |r1| |
|
330 | ['57ca437c', '57ca437c0acbbcb749821fdf3726a1367056d364'].each do |r1| |
General Comments 0
You need to be logged in to leave comments.
Login now