fix scm_iconv local variable name (#12228)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10741 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
5a2c80cb48
commit
123d2b318f
|
@ -264,7 +264,7 @@ module Redmine
|
||||||
str.force_encoding(from)
|
str.force_encoding(from)
|
||||||
begin
|
begin
|
||||||
s = str.encode(to)
|
s = str.encode(to)
|
||||||
rescue Exception => e
|
rescue Exception => err
|
||||||
logger.error("failed to convert from #{from} to #{to}. #{err}")
|
logger.error("failed to convert from #{from} to #{to}. #{err}")
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
|
@ -460,6 +460,23 @@ begin
|
||||||
assert_equal Time.gm(2009, 6, 19, 4, 37, 23), readme.lastrev.time
|
assert_equal Time.gm(2009, 6, 19, 4, 37, 23), readme.lastrev.time
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_entries_wrong_path_encoding
|
||||||
|
adpt = Redmine::Scm::Adapters::GitAdapter.new(
|
||||||
|
REPOSITORY_PATH,
|
||||||
|
nil,
|
||||||
|
nil,
|
||||||
|
nil,
|
||||||
|
'EUC-JP'
|
||||||
|
)
|
||||||
|
entries1 = adpt.entries('latin-1-dir', '64f1f3e8')
|
||||||
|
assert entries1
|
||||||
|
assert_equal 3, entries1.size
|
||||||
|
f1 = entries1[1]
|
||||||
|
assert_equal nil, f1.name
|
||||||
|
assert_equal nil, f1.path
|
||||||
|
assert_equal 'file', f1.kind
|
||||||
|
end
|
||||||
|
|
||||||
def test_entries_latin_1_files
|
def test_entries_latin_1_files
|
||||||
entries1 = @adapter.entries('latin-1-dir', '64f1f3e8')
|
entries1 = @adapter.entries('latin-1-dir', '64f1f3e8')
|
||||||
assert entries1
|
assert entries1
|
||||||
|
|
Loading…
Reference in New Issue