]> source.dussan.org Git - redmine.git/commitdiff
scm: mercurial: add test of annotate non ASCII contents in functional test.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 7 May 2011 14:22:42 +0000 (14:22 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 7 May 2011 14:22:42 +0000 (14:22 +0000)
TODO: this test fails in Ruby 1.9 and Encoding.default_external is not UTF-8.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5692 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/repositories_mercurial_controller_test.rb

index b6a1fb6ded26400f59073699ec468940e33096e0..e521631c752198fc5a7be708e8960b97e31dad1f 100644 (file)
@@ -390,6 +390,20 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase
       end
     end
 
+    def test_annotate_latin_1_contents
+      with_settings :repositories_encodings => 'UTF-8,ISO-8859-1' do
+        [27, '7bbf4c738e71'].each do |r1|
+          get :annotate, :id => PRJ_ID,
+              :path => ['latin-1-dir', "test-#{@char_1}.txt"], :rev => r1
+          assert_tag :tag => 'th',
+                     :content => '1',
+                     :attributes => { :class => 'line-num' },
+                     :sibling => { :tag => 'td',
+                                   :content => /test-#{@char_1}.txt/ }
+        end
+      end
+    end
+
     def test_empty_revision
       @repository.fetch_changesets
       @repository.reload