From 0743ba89d405fba39b94fa58a0dc4f799b604e49 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 8 Jan 2011 12:51:36 +0000 Subject: [PATCH] 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 --- .../lib/redmine/scm/adapters/mercurial_adapter_test.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 db050c836..afd7b2700 100644 --- a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb @@ -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 -- 2.39.5