@@ -33,6 +33,14 class RepositoryGitTest < ActiveSupport::TestCase | |||||
33 | # WINDOWS_PASS = Redmine::Platform.mswin? |
|
33 | # WINDOWS_PASS = Redmine::Platform.mswin? | |
34 | WINDOWS_PASS = false |
|
34 | WINDOWS_PASS = false | |
35 |
|
35 | |||
|
36 | ## Git, Mercurial and CVS path encodings are binary. | |||
|
37 | ## Subversion supports URL encoding for path. | |||
|
38 | ## Redmine Mercurial adapter and extension use URL encoding. | |||
|
39 | ## Git accepts only binary path in command line parameter. | |||
|
40 | ## So, there is no way to use binary command line parameter in JRuby. | |||
|
41 | JRUBY_SKIP = (RUBY_PLATFORM == 'java') | |||
|
42 | JRUBY_SKIP_STR = "TODO: This test fails in JRuby" | |||
|
43 | ||||
36 | if File.directory?(REPOSITORY_PATH) |
|
44 | if File.directory?(REPOSITORY_PATH) | |
37 | def setup |
|
45 | def setup | |
38 | klass = Repository::Git |
|
46 | klass = Repository::Git | |
@@ -308,24 +316,30 class RepositoryGitTest < ActiveSupport::TestCase | |||||
308 | '61b685fbe55ab05b5ac68402d5720c1a6ac973d1', |
|
316 | '61b685fbe55ab05b5ac68402d5720c1a6ac973d1', | |
309 | ], changesets.collect(&:revision) |
|
317 | ], changesets.collect(&:revision) | |
310 |
|
318 | |||
311 | # latin-1 encoding path |
|
319 | if JRUBY_SKIP | |
312 | changesets = @repository.latest_changesets( |
|
320 | puts JRUBY_SKIP_STR | |
313 | "latin-1-dir/test-#{@char_1}-2.txt", '64f1f3e89') |
|
321 | else | |
314 | assert_equal [ |
|
322 | # latin-1 encoding path | |
|
323 | changesets = @repository.latest_changesets( | |||
|
324 | "latin-1-dir/test-#{@char_1}-2.txt", '64f1f3e89') | |||
|
325 | assert_equal [ | |||
315 | '64f1f3e89ad1cb57976ff0ad99a107012ba3481d', |
|
326 | '64f1f3e89ad1cb57976ff0ad99a107012ba3481d', | |
316 | '4fc55c43bf3d3dc2efb66145365ddc17639ce81e', |
|
327 | '4fc55c43bf3d3dc2efb66145365ddc17639ce81e', | |
317 | ], changesets.collect(&:revision) |
|
328 | ], changesets.collect(&:revision) | |
318 |
|
329 | |||
319 | changesets = @repository.latest_changesets( |
|
330 | changesets = @repository.latest_changesets( | |
320 | "latin-1-dir/test-#{@char_1}-2.txt", '64f1f3e89', 1) |
|
331 | "latin-1-dir/test-#{@char_1}-2.txt", '64f1f3e89', 1) | |
321 | assert_equal [ |
|
332 | assert_equal [ | |
322 | '64f1f3e89ad1cb57976ff0ad99a107012ba3481d', |
|
333 | '64f1f3e89ad1cb57976ff0ad99a107012ba3481d', | |
323 | ], changesets.collect(&:revision) |
|
334 | ], changesets.collect(&:revision) | |
|
335 | end | |||
324 | end |
|
336 | end | |
325 |
|
337 | |||
326 | def test_latest_changesets_latin_1_dir |
|
338 | def test_latest_changesets_latin_1_dir | |
327 | if WINDOWS_PASS |
|
339 | if WINDOWS_PASS | |
328 | # |
|
340 | # | |
|
341 | elsif JRUBY_SKIP | |||
|
342 | puts JRUBY_SKIP_STR | |||
329 | else |
|
343 | else | |
330 | @repository.fetch_changesets |
|
344 | @repository.fetch_changesets | |
331 | @repository.reload |
|
345 | @repository.reload |
General Comments 0
You need to be logged in to leave comments.
Login now