]> source.dussan.org Git - redmine.git/commitdiff
scm: filesystem: add test for UTF-16 file displaying (#6256).
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Mar 2011 15:32:47 +0000 (15:32 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Mar 2011 15:32:47 +0000 (15:32 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5206 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/functional/repositories_filesystem_controller_test.rb

index be1ea9281798c3c0b95d9c86720ca11c22a1dffe..e816115dca3bf803d6f51e7f6fb3eb34b9a84ec7 100644 (file)
@@ -76,6 +76,17 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase
                    :sibling => { :tag => 'td', :content => /japanese/ }
       end
     end
+
+    def test_show_utf16
+      with_settings :repositories_encodings => 'UTF-16' do
+        get :entry, :id => PRJ_ID, :path => ['japanese', 'utf-16.txt']
+        assert_response :success
+        assert_tag :tag => 'th',
+                   :content => '2',
+                   :attributes => { :class => 'line-num' },
+                   :sibling => { :tag => 'td', :content => /japanese/ }
+      end
+    end
   else
     puts "Filesystem test repository NOT FOUND. Skipping functional tests !!!"
     def test_fake; assert true end