scm: git: update test repository for path encoding (#5251).
Mercurial and Git treats file names as byte string. This git test repository contains Latin-1 encoding path. Be careful on non Latin-1(CP1252) Windows. Please see r4996 comment. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5026 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
90d4447bd3
commit
3a56e1eeab
Binary file not shown.
|
@ -28,11 +28,12 @@ begin
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_branches
|
def test_branches
|
||||||
assert_equal @adapter.branches, ['master', 'test-latin-1', 'test_branch']
|
assert_equal ['latin-1-path-encoding', 'master', 'test-latin-1', 'test_branch'],
|
||||||
|
@adapter.branches
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_getting_all_revisions
|
def test_getting_all_revisions
|
||||||
assert_equal 16, @adapter.revisions('',nil,nil,:all => true).length
|
assert_equal 21, @adapter.revisions('',nil,nil,:all => true).length
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_getting_certain_revisions
|
def test_getting_certain_revisions
|
||||||
|
|
|
@ -38,8 +38,8 @@ class RepositoryGitTest < ActiveSupport::TestCase
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
@repository.reload
|
@repository.reload
|
||||||
|
|
||||||
assert_equal 16, @repository.changesets.count
|
assert_equal 21, @repository.changesets.count
|
||||||
assert_equal 25, @repository.changes.count
|
assert_equal 31, @repository.changes.count
|
||||||
|
|
||||||
commit = @repository.changesets.find(:first, :order => 'committed_on ASC')
|
commit = @repository.changesets.find(:first, :order => 'committed_on ASC')
|
||||||
assert_equal "Initial import.\nThe repository contains 3 files.", commit.comments
|
assert_equal "Initial import.\nThe repository contains 3 files.", commit.comments
|
||||||
|
@ -59,7 +59,7 @@ class RepositoryGitTest < ActiveSupport::TestCase
|
||||||
def test_fetch_changesets_incremental
|
def test_fetch_changesets_incremental
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
# Remove the 3 latest changesets
|
# Remove the 3 latest changesets
|
||||||
@repository.changesets.find(:all, :order => 'committed_on DESC', :limit => 3).each(&:destroy)
|
@repository.changesets.find(:all, :order => 'committed_on DESC', :limit => 8).each(&:destroy)
|
||||||
@repository.reload
|
@repository.reload
|
||||||
cs1 = @repository.changesets
|
cs1 = @repository.changesets
|
||||||
assert_equal 13, cs1.count
|
assert_equal 13, cs1.count
|
||||||
|
@ -74,7 +74,7 @@ class RepositoryGitTest < ActiveSupport::TestCase
|
||||||
assert_equal rev_a_committed_on, latest_rev.committed_on
|
assert_equal rev_a_committed_on, latest_rev.committed_on
|
||||||
|
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
assert_equal 16, @repository.changesets.count
|
assert_equal 21, @repository.changesets.count
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_find_changeset_by_name
|
def test_find_changeset_by_name
|
||||||
|
|
Loading…
Reference in New Issue