scm: mercurial: test: add test of parents to unit lib test (#5501)

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7667 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-10-28 04:57:43 +00:00
parent 031b5bf4eb
commit 613a056ed6
1 changed files with 15 additions and 0 deletions

View File

@ -91,6 +91,21 @@ begin
assert_equal '400bb8672109', revisions[0].scmid
end
def test_parents
revs1 = @adapter.revisions(nil, 0, 0)
assert_equal 1, revs1.size
assert_equal [], revs1[0].parents
revs2 = @adapter.revisions(nil, 1, 1)
assert_equal 1, revs2.size
assert_equal 1, revs2[0].parents.size
assert_equal "0885933ad4f6", revs2[0].parents[0]
revs3 = @adapter.revisions(nil, 30, 30)
assert_equal 1, revs3.size
assert_equal 2, revs3[0].parents.size
assert_equal "a94b0528f24f", revs3[0].parents[0]
assert_equal "3a330eb32958", revs3[0].parents[1]
end
def test_diff
if @adapter.class.client_version_above?([1, 2])
assert_nil @adapter.diff(nil, '100000')