@@ -283,7 +283,7 module Redmine | |||||
283 |
|
283 | |||
284 | def scm_iconv(to, from, str) |
|
284 | def scm_iconv(to, from, str) | |
285 | return nil if str.nil? |
|
285 | return nil if str.nil? | |
286 | return str if to == from |
|
286 | return str if to == from && str.encoding.to_s == from | |
287 | str.force_encoding(from) |
|
287 | str.force_encoding(from) | |
288 | begin |
|
288 | begin | |
289 | str.encode(to) |
|
289 | str.encode(to) |
@@ -179,6 +179,7 class RepositoryCvsTest < ActiveSupport::TestCase | |||||
179 | assert_kind_of Redmine::Scm::Adapters::Entries, entries |
|
179 | assert_kind_of Redmine::Scm::Adapters::Entries, entries | |
180 | assert_equal 3, entries.size |
|
180 | assert_equal 3, entries.size | |
181 | assert_equal entries[2].name, "README" |
|
181 | assert_equal entries[2].name, "README" | |
|
182 | assert_equal 'UTF-8', entries[2].path.encoding.to_s | |||
182 | assert_equal entries[2].lastrev.time, Time.gm(2007, 12, 13, 16, 27, 22) |
|
183 | assert_equal entries[2].lastrev.time, Time.gm(2007, 12, 13, 16, 27, 22) | |
183 | assert_equal entries[2].lastrev.identifier, '3' |
|
184 | assert_equal entries[2].lastrev.identifier, '3' | |
184 | assert_equal entries[2].lastrev.revision, '3' |
|
185 | assert_equal entries[2].lastrev.revision, '3' |
General Comments 0
You need to be logged in to leave comments.
Login now