summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-03-14 04:54:45 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-03-14 04:54:45 +0000
commit5edc631791aa0ab49691f380df608ae4c181e542 (patch)
treefe5faadbe527dd8e0cf67eaf625d9739352eefe9 /test
parentbf6ec48bea07f2fb9ce15823992f6306ae2719ef (diff)
downloadredmine-5edc631791aa0ab49691f380df608ae4c181e542.tar.gz
redmine-5edc631791aa0ab49691f380df608ae4c181e542.zip
scm: mercurial: prepare test of wrapping revision of cat and annotate with URL encoding (#1981, #7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5113 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb13
1 files changed, 10 insertions, 3 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 84f5c2978..4c8a58fa0 100644
--- a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb
+++ b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb
@@ -14,13 +14,20 @@ begin
if File.directory?(REPOSITORY_PATH)
def setup
- @adapter = Redmine::Scm::Adapters::MercurialAdapter.new(REPOSITORY_PATH)
+ @adapter = Redmine::Scm::Adapters::MercurialAdapter.new(
+ REPOSITORY_PATH,
+ nil,
+ nil,
+ nil,
+ 'ISO-8859-1')
@diff_c_support = true
+ @char_1 = CHAR_1_HEX.dup
@tag_char_1 = "tag-#{CHAR_1_HEX}-00"
@branch_char_0 = "branch-#{CHAR_1_HEX}-00"
@branch_char_1 = "branch-#{CHAR_1_HEX}-01"
if @tag_char_1.respond_to?(:force_encoding)
+ @char_1.force_encoding('UTF-8')
@tag_char_1.force_encoding('UTF-8')
@branch_char_0.force_encoding('UTF-8')
@branch_char_1.force_encoding('UTF-8')
@@ -273,8 +280,8 @@ begin
assert_equal 1, @adapter.annotate(p, r1).lines.length
[25, 'afc61e85bde7'].each do |r2|
assert @adapter.diff(p, r1, r2)
- end
- end
+ end
+ end
end
def test_nodes_in_branch