scm: mercurial: add unit lib test for the previous changeset isn't the parent (#7253, #7518).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4792 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-02-02 10:01:22 +00:00 committed by Eric Davis
parent b7e38791f2
commit 9524795051
1 changed files with 11 additions and 0 deletions

View File

@ -69,6 +69,17 @@ begin
end
end
def test_diff_made_by_revision
if @adapter.class.client_version_above?([1, 2])
[16, '16', '4cddb4e45f52'].each do |r1|
diff1 = @adapter.diff(nil, r1)
assert_equal 5, diff1.size
buf = diff1[4].gsub(/\r\n|\r|\n/, "")
assert_equal '+0885933ad4f68d77c2649cd11f8311276e7ef7ce tag-init-revision', buf
end
end
end
def test_cat
[2, '400bb8672109', '400', 400].each do |r|
buf = @adapter.cat('sources/welcome_controller.rb', r)