scm: mercurial: cat test for accept both of revision number and changeset id (#3724).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4661 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
0617625f48
commit
0743ba89d4
|
@ -43,8 +43,14 @@ begin
|
|||
end
|
||||
|
||||
def test_cat
|
||||
assert @adapter.cat("sources/welcome_controller.rb", 2)
|
||||
assert_nil @adapter.cat("sources/welcome_controller.rb")
|
||||
[2, '400bb8672109', '400', 400].each do |r|
|
||||
buf = @adapter.cat('sources/welcome_controller.rb', r)
|
||||
assert buf
|
||||
lines = buf.split("\r\n")
|
||||
assert_equal 25, lines.length
|
||||
assert_equal 'class WelcomeController < ApplicationController', lines[17]
|
||||
end
|
||||
assert_nil @adapter.cat('sources/welcome_controller.rb')
|
||||
end
|
||||
|
||||
def test_access_by_nodeid
|
||||
|
|
Loading…
Reference in New Issue