scm: cvs: update test repository.
add "tag00" tag and "branch00" branch. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5451 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
b091c98238
commit
d43bc98a49
BIN
test/fixtures/repositories/cvs_repository.tar.gz
vendored
BIN
test/fixtures/repositories/cvs_repository.tar.gz
vendored
Binary file not shown.
@ -27,7 +27,7 @@ begin
|
|||||||
@adapter.revisions('', nil, nil, :with_paths => true) do |revision|
|
@adapter.revisions('', nil, nil, :with_paths => true) do |revision|
|
||||||
cnt += 1
|
cnt += 1
|
||||||
end
|
end
|
||||||
assert_equal 14, cnt
|
assert_equal 16, cnt
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_revisions_from_rev3
|
def test_revisions_from_rev3
|
||||||
@ -36,7 +36,7 @@ begin
|
|||||||
@adapter.revisions('', rev3_committed_on, nil, :with_paths => true) do |revision|
|
@adapter.revisions('', rev3_committed_on, nil, :with_paths => true) do |revision|
|
||||||
cnt += 1
|
cnt += 1
|
||||||
end
|
end
|
||||||
assert_equal 2, cnt
|
assert_equal 4, cnt
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_entries_rev3
|
def test_entries_rev3
|
||||||
|
@ -25,6 +25,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase
|
|||||||
REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
|
REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
|
||||||
# CVS module
|
# CVS module
|
||||||
MODULE_NAME = 'test'
|
MODULE_NAME = 'test'
|
||||||
|
CHANGESETS_NUM = 7
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@project = Project.find(3)
|
@project = Project.find(3)
|
||||||
@ -41,8 +42,8 @@ class RepositoryCvsTest < ActiveSupport::TestCase
|
|||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
@repository.reload
|
@repository.reload
|
||||||
|
|
||||||
assert_equal 5, @repository.changesets.count
|
assert_equal CHANGESETS_NUM, @repository.changesets.count
|
||||||
assert_equal 14, @repository.changes.count
|
assert_equal 16, @repository.changes.count
|
||||||
assert_not_nil @repository.changesets.find_by_comments('Two files changed')
|
assert_not_nil @repository.changesets.find_by_comments('Two files changed')
|
||||||
|
|
||||||
r2 = @repository.changesets.find_by_revision('2')
|
r2 = @repository.changesets.find_by_revision('2')
|
||||||
@ -69,10 +70,10 @@ class RepositoryCvsTest < ActiveSupport::TestCase
|
|||||||
|
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
@repository.reload
|
@repository.reload
|
||||||
assert_equal 5, @repository.changesets.count
|
assert_equal CHANGESETS_NUM, @repository.changesets.count
|
||||||
|
|
||||||
assert_equal %w|5 4 3 2 1|, @repository.changesets.collect(&:revision)
|
assert_equal %w|7 6 5 4 3 2 1|, @repository.changesets.collect(&:revision)
|
||||||
rev5_commit = @repository.changesets.find(:first, :order => 'committed_on DESC')
|
rev5_commit = @repository.changesets.find_by_revision('5')
|
||||||
assert_equal 'HEAD-20071213-163001', rev5_commit.scmid
|
assert_equal 'HEAD-20071213-163001', rev5_commit.scmid
|
||||||
# 2007-12-14 01:30:01 +0900
|
# 2007-12-14 01:30:01 +0900
|
||||||
rev5_committed_on = Time.gm(2007, 12, 13, 16, 30, 1)
|
rev5_committed_on = Time.gm(2007, 12, 13, 16, 30, 1)
|
||||||
@ -83,7 +84,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase
|
|||||||
assert_equal 0, @repository.changesets.count
|
assert_equal 0, @repository.changesets.count
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
@repository.reload
|
@repository.reload
|
||||||
assert_equal 5, @repository.changesets.count
|
assert_equal CHANGESETS_NUM, @repository.changesets.count
|
||||||
|
|
||||||
entries = @repository.entries('sources')
|
entries = @repository.entries('sources')
|
||||||
assert entries.detect {|e| e.name == 'watchers_controller.rb'}
|
assert entries.detect {|e| e.name == 'watchers_controller.rb'}
|
||||||
@ -121,7 +122,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase
|
|||||||
buf = @repository.cat('README')
|
buf = @repository.cat('README')
|
||||||
assert buf
|
assert buf
|
||||||
lines = buf.split("\n")
|
lines = buf.split("\n")
|
||||||
assert_equal 2, lines.length
|
assert_equal 3, lines.length
|
||||||
buf = lines[1].gsub(/\r$/, "")
|
buf = lines[1].gsub(/\r$/, "")
|
||||||
assert_equal 'with one change', buf
|
assert_equal 'with one change', buf
|
||||||
buf = @repository.cat('README', '1')
|
buf = @repository.cat('README', '1')
|
||||||
@ -145,7 +146,7 @@ class RepositoryCvsTest < ActiveSupport::TestCase
|
|||||||
@repository.reload
|
@repository.reload
|
||||||
ann = @repository.annotate('README')
|
ann = @repository.annotate('README')
|
||||||
assert ann
|
assert ann
|
||||||
assert_equal 2, ann.revisions.length
|
assert_equal 3, ann.revisions.length
|
||||||
assert_equal '1.2', ann.revisions[1].revision
|
assert_equal '1.2', ann.revisions[1].revision
|
||||||
assert_equal 'LANG', ann.revisions[1].author
|
assert_equal 'LANG', ann.revisions[1].author
|
||||||
assert_equal 'with one change', ann.lines[1]
|
assert_equal 'with one change', ann.lines[1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user