From 88231f460fb1aadfc338a38e43efe99a500f9073 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 27 Nov 2011 12:09:11 +0000 Subject: [PATCH] add csv separator check to the test to export time entry csv in Traditional Chinese (#8368) git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7949 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/time_entry_reports_controller_test.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/functional/time_entry_reports_controller_test.rb b/test/functional/time_entry_reports_controller_test.rb index 0fac8294a..992ee7163 100644 --- a/test/functional/time_entry_reports_controller_test.rb +++ b/test/functional/time_entry_reports_controller_test.rb @@ -6,6 +6,8 @@ class TimeEntryReportsControllerTest < ActionController::TestCase :issues, :time_entries, :users, :trackers, :enumerations, :issue_statuses, :custom_fields, :custom_values + include Redmine::I18n + def setup Setting.default_language = "en" end @@ -190,6 +192,15 @@ class TimeEntryReportsControllerTest < ActionController::TestCase # Total row assert_equal "#{str_big5} #{user.lastname},7.30,7.30", lines[1] assert_equal "#{s2},7.30,7.30", lines[2] + + str_tw = "Traditional Chinese (\xe7\xb9\x81\xe9\xab\x94\xe4\xb8\xad\xe6\x96\x87)" + if str_tw.respond_to?(:force_encoding) + str_tw.force_encoding('UTF-8') + end + assert_equal str_tw, l(:general_lang_name) + assert_equal 'Big5', l(:general_csv_encoding) + assert_equal ',', l(:general_csv_separator) + assert_equal '.', l(:general_csv_decimal_separator) end def test_csv_cannot_convert_should_be_replaced_big_5