Project

General

Profile

Patch #29441 » code_cleanup.patch

Marius BĂLTEANU, 2018-08-26 14:27

View differences:

test/functional/repositories_git_controller_test.rb
30 30
  FELIX_HEX  = "Felix Sch\xC3\xA4fer".force_encoding('UTF-8')
31 31
  NUM_REV = 28
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

  
41 33
  def setup
42 34
    super
43 35
    @ruby19_non_utf8_pass = Encoding.default_external.to_s != 'UTF-8'
......
63 55
            :is_default => '0',
64 56
            :identifier => 'test-create',
65 57
            :report_last_commit => '1',
66
                                 
58

  
67 59
          }
68 60
        }
69 61
    end
......
77 69
        :id => repository.id,
78 70
        :repository => {
79 71
          :report_last_commit => '0'
80
          
72

  
81 73
        }
82 74
      }
83 75
    assert_response 302
......
248 240
        puts_ruby19_non_utf8_pass()
249 241
      elsif WINDOWS_PASS
250 242
        puts WINDOWS_SKIP_STR
251
      elsif JRUBY_SKIP
252
        puts JRUBY_SKIP_STR
253 243
      else
254 244
        with_settings :repositories_encodings => 'UTF-8,ISO-8859-1' do
255 245
          ['57ca437c', '57ca437c0acbbcb749821fdf3726a1367056d364'].each do |r1|
......
547 537
        puts_ruby19_non_utf8_pass()
548 538
      elsif WINDOWS_PASS
549 539
        puts WINDOWS_SKIP_STR
550
      elsif JRUBY_SKIP
551
        puts JRUBY_SKIP_STR
552 540
      else
553 541
        with_settings :repositories_encodings => 'UTF-8,ISO-8859-1' do
554 542
          ['57ca437c', '57ca437c0acbbcb749821fdf3726a1367056d364'].each do |r1|
test/unit/repository_bazaar_test.rb
32 32
  # "bzr" command output and command line parameter depend on locale.
33 33
  # So, non ASCII path tests cannot run independent locale.
34 34
  #
35
  # If you want to run Bazaar non ASCII path tests on Linux *Ruby 1.9*,
36
  # you need to set locale character set "ISO-8859-1".
37
  # E.g. "LANG=en_US.ISO-8859-1".
38
  # On Linux other platforms (e.g. Ruby 1.8, JRuby),
39
  # you need to set "RUN_LATIN1_OUTPUT_TEST = true" manually.
40
  #
41 35
  # On Windows, because it is too hard to change system locale,
42 36
  # you cannot run Bazaar non ASCII path tests.
43 37
  #
test/unit/repository_git_test.rb
31 31
  FELIX_HEX  = "Felix Sch\xC3\xA4fer".force_encoding('UTF-8')
32 32
  CHAR_1_HEX = "\xc3\x9c".force_encoding('UTF-8')
33 33

  
34
  ## Git, Mercurial and CVS path encodings are binary.
35
  ## Subversion supports URL encoding for path.
36
  ## Redmine Mercurial adapter and extension use URL encoding.
37
  ## Git accepts only binary path in command line parameter.
38
  ## So, there is no way to use binary command line parameter in JRuby.
39
  JRUBY_SKIP     = (RUBY_PLATFORM == 'java')
40
  JRUBY_SKIP_STR = "TODO: This test fails in JRuby"
41

  
42 34
  def setup
43 35
    @project = Project.find(3)
44 36
    @repository = Repository::Git.create(
......
462 454

  
463 455
      if WINDOWS_PASS
464 456
        puts WINDOWS_SKIP_STR
465
      elsif JRUBY_SKIP
466
        puts JRUBY_SKIP_STR
467 457
      else
468 458
        # latin-1 encoding path
469 459
        changesets = @repository.latest_changesets(
......
484 474
    def test_latest_changesets_latin_1_dir
485 475
      if WINDOWS_PASS
486 476
        puts WINDOWS_SKIP_STR
487
      elsif JRUBY_SKIP
488
        puts JRUBY_SKIP_STR
489 477
      else
490 478
        assert_equal 0, @repository.changesets.count
491 479
        @repository.fetch_changesets
(1-1/2)