@@ -264,7 +264,7 module Redmine | |||
|
264 | 264 | str.force_encoding(from) |
|
265 | 265 | begin |
|
266 | 266 | s = str.encode(to) |
|
267 | rescue Exception => e | |
|
267 | rescue Exception => err | |
|
268 | 268 | logger.error("failed to convert from #{from} to #{to}. #{err}") |
|
269 | 269 | nil |
|
270 | 270 | end |
@@ -460,6 +460,23 begin | |||
|
460 | 460 | assert_equal Time.gm(2009, 6, 19, 4, 37, 23), readme.lastrev.time |
|
461 | 461 | end |
|
462 | 462 | |
|
463 | def test_entries_wrong_path_encoding | |
|
464 | adpt = Redmine::Scm::Adapters::GitAdapter.new( | |
|
465 | REPOSITORY_PATH, | |
|
466 | nil, | |
|
467 | nil, | |
|
468 | nil, | |
|
469 | 'EUC-JP' | |
|
470 | ) | |
|
471 | entries1 = adpt.entries('latin-1-dir', '64f1f3e8') | |
|
472 | assert entries1 | |
|
473 | assert_equal 3, entries1.size | |
|
474 | f1 = entries1[1] | |
|
475 | assert_equal nil, f1.name | |
|
476 | assert_equal nil, f1.path | |
|
477 | assert_equal 'file', f1.kind | |
|
478 | end | |
|
479 | ||
|
463 | 480 | def test_entries_latin_1_files |
|
464 | 481 | entries1 = @adapter.entries('latin-1-dir', '64f1f3e8') |
|
465 | 482 | assert entries1 |
General Comments 0
You need to be logged in to leave comments.
Login now