diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-07 13:35:31 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-05-07 13:35:31 +0000 |
commit | ff6a86364e9923c88d5e9fad6f828962469365e4 (patch) | |
tree | 136fb32f51632d0c089ee03e980ef3ab0014b886 /test/functional/repositories_mercurial_controller_test.rb | |
parent | c5257f6e0dd9124aab79fea2ddcec1df0cab7e7a (diff) | |
download | redmine-ff6a86364e9923c88d5e9fad6f828962469365e4.tar.gz redmine-ff6a86364e9923c88d5e9fad6f828962469365e4.zip |
scm: mercurial: add test of diff non ASCII path name in functional test.
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@5689 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/repositories_mercurial_controller_test.rb')
-rw-r--r-- | test/functional/repositories_mercurial_controller_test.rb | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/test/functional/repositories_mercurial_controller_test.rb b/test/functional/repositories_mercurial_controller_test.rb index 6c2e6f0c0..734dbee00 100644 --- a/test/functional/repositories_mercurial_controller_test.rb +++ b/test/functional/repositories_mercurial_controller_test.rb @@ -277,15 +277,26 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase end def test_diff_latin_1_path - [21, 'adf805632193'].each do |r1| - get :diff, :id => PRJ_ID, :rev => r1 - assert_response :success - assert_template 'diff' - assert_tag :tag => 'th', - :content => '2', - :sibling => {:tag => 'td', - :attributes => { :class => /diff_in/ }, - :content => /It is written in Python/ } + with_settings :repositories_encodings => 'UTF-8,ISO-8859-1' do + [21, 'adf805632193'].each do |r1| + get :diff, :id => PRJ_ID, :rev => r1 + assert_response :success + assert_template 'diff' + assert_tag :tag => 'thead', + :descendant => { + :tag => 'th', + :attributes => { :class => 'filename' } , + :content => /latin-1-dir\/test-#{@char_1}-2.txt/ , + }, + :sibling => { + :tag => 'tbody', + :descendant => { + :tag => 'td', + :attributes => { :class => /diff_in/ }, + :content => /It is written in Python/ + } + } + end end end |