summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-10-28 01:44:12 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-10-28 01:44:12 +0000
commit476c3d54b7118fdc9bc0acb3b58de781ef15d614 (patch)
tree4537b9c1727469bf5f1335dd7079c71b00123691 /test
parent370de46974b9e0d64379f2a650a671e01b8d7a71 (diff)
downloadredmine-476c3d54b7118fdc9bc0acb3b58de781ef15d614.tar.gz
redmine-476c3d54b7118fdc9bc0acb3b58de781ef15d614.zip
scm: mercurial: update test repository (#5501)
This test repository has one merged revision. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7662 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/repositories/mercurial_repository.hgbin10130 -> 11046 bytes
-rw-r--r--test/functional/repositories_mercurial_controller_test.rb2
-rw-r--r--test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb8
-rw-r--r--test/unit/repository_mercurial_test.rb18
4 files changed, 15 insertions, 13 deletions
diff --git a/test/fixtures/repositories/mercurial_repository.hg b/test/fixtures/repositories/mercurial_repository.hg
index 54a8c2ef7..0b621e724 100644
--- a/test/fixtures/repositories/mercurial_repository.hg
+++ b/test/fixtures/repositories/mercurial_repository.hg
Binary files differ
diff --git a/test/functional/repositories_mercurial_controller_test.rb b/test/functional/repositories_mercurial_controller_test.rb
index 418d7f526..71a29af6e 100644
--- a/test/functional/repositories_mercurial_controller_test.rb
+++ b/test/functional/repositories_mercurial_controller_test.rb
@@ -28,7 +28,7 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase
REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s
CHAR_1_HEX = "\xc3\x9c"
PRJ_ID = 3
- NUM_REV = 29
+ NUM_REV = 32
ruby19_non_utf8_pass =
(RUBY_VERSION >= '1.9' && Encoding.default_external.to_s != 'UTF-8')
diff --git a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb
index 10a78c4af..cbd67c8fd 100644
--- a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb
+++ b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb
@@ -72,8 +72,8 @@ begin
adp = Redmine::Scm::Adapters::MercurialAdapter.new(repo)
repo_path = adp.info.root_url.gsub(/\\/, "/")
assert_equal REPOSITORY_PATH, repo_path
- assert_equal '28', adp.info.lastrev.revision
- assert_equal '3ae45e2d177d',adp.info.lastrev.scmid
+ assert_equal '31', adp.info.lastrev.revision
+ assert_equal '31eeee7395c8',adp.info.lastrev.scmid
end
end
@@ -257,6 +257,7 @@ begin
def test_branches
assert_equal [
'default',
+ 'test-branch-01',
@branch_char_1,
'branch (1)[2]&,%.-3_4',
@branch_char_0,
@@ -267,10 +268,11 @@ begin
def test_branchmap
bm = {
- 'default' => '3ae45e2d177d',
+ 'default' => '31eeee7395c8',
'test_branch.latin-1' => 'c2ffe7da686a',
'branch (1)[2]&,%.-3_4' => 'afc61e85bde7',
'test-branch-00' => '3a330eb32958',
+ "test-branch-01" => 'ad4dc4f80284',
@branch_char_0 => 'c8d3e4887474',
@branch_char_1 => '7bbf4c738e71',
}
diff --git a/test/unit/repository_mercurial_test.rb b/test/unit/repository_mercurial_test.rb
index 402565ee9..f33640d11 100644
--- a/test/unit/repository_mercurial_test.rb
+++ b/test/unit/repository_mercurial_test.rb
@@ -21,7 +21,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
fixtures :projects
REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s
- NUM_REV = 29
+ NUM_REV = 32
CHAR_1_HEX = "\xc3\x9c"
if File.directory?(REPOSITORY_PATH)
@@ -56,7 +56,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
@repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
- assert_equal 37, @repository.changes.count
+ assert_equal 46, @repository.changes.count
assert_equal "Initial import.\nThe repository contains 3 files.",
@repository.changesets.find_by_revision('0').comments
end
@@ -109,19 +109,19 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
# with_limit
changesets = @repository.latest_changesets('', nil, 2)
- assert_equal %w|28 27|, changesets.collect(&:revision)
+ assert_equal %w|31 30|, changesets.collect(&:revision)
# with_filepath
changesets = @repository.latest_changesets(
'/sql_escape/percent%dir/percent%file1.txt', nil)
- assert_equal %w|11 10 9|, changesets.collect(&:revision)
+ assert_equal %w|30 11 10 9|, changesets.collect(&:revision)
changesets = @repository.latest_changesets(
'/sql_escape/underscore_dir/understrike_file.txt', nil)
- assert_equal %w|12 9|, changesets.collect(&:revision)
+ assert_equal %w|30 12 9|, changesets.collect(&:revision)
changesets = @repository.latest_changesets('README', nil)
- assert_equal %w|28 17 8 6 1 0|, changesets.collect(&:revision)
+ assert_equal %w|31 30 28 17 8 6 1 0|, changesets.collect(&:revision)
changesets = @repository.latest_changesets('README','8')
assert_equal %w|8 6 1 0|, changesets.collect(&:revision)
@@ -135,7 +135,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
path = 'sql_escape/percent%dir'
changesets = @repository.latest_changesets(path, nil)
- assert_equal %w|13 11 10 9|, changesets.collect(&:revision)
+ assert_equal %w|30 13 11 10 9|, changesets.collect(&:revision)
changesets = @repository.latest_changesets(path, '11')
assert_equal %w|11 10 9|, changesets.collect(&:revision)
@@ -145,7 +145,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
path = 'sql_escape/underscore_dir'
changesets = @repository.latest_changesets(path, nil)
- assert_equal %w|13 12 9|, changesets.collect(&:revision)
+ assert_equal %w|30 13 12 9|, changesets.collect(&:revision)
changesets = @repository.latest_changesets(path, '12')
assert_equal %w|12 9|, changesets.collect(&:revision)
@@ -312,7 +312,7 @@ class RepositoryMercurialTest < ActiveSupport::TestCase
@repository.fetch_changesets
@project.reload
assert_equal NUM_REV, @repository.changesets.count
- %w|28 3ae45e2d177d 3ae45|.each do |r1|
+ %w|31 31eeee7395c8 31eee|.each do |r1|
changeset = @repository.find_changeset_by_name(r1)
assert_nil changeset.next
end