@@ -260,7 +260,7 class ChangesetTest < ActiveSupport::TestCase | |||||
260 | proj = Project.find(3) |
|
260 | proj = Project.find(3) | |
261 | # str = File.read("#{RAILS_ROOT}/test/fixtures/encoding/iso-8859-1.txt") |
|
261 | # str = File.read("#{RAILS_ROOT}/test/fixtures/encoding/iso-8859-1.txt") | |
262 | str1 = "Texte encod\xe9 en ISO-8859-1." |
|
262 | str1 = "Texte encod\xe9 en ISO-8859-1." | |
263 | str2 = "\xe9a\xe9b\xe9c\xe9d\xe9e" |
|
263 | str2 = "\xe9a\xe9b\xe9c\xe9d\xe9e test" | |
264 | str1.force_encoding("UTF-8") if str1.respond_to?(:force_encoding) |
|
264 | str1.force_encoding("UTF-8") if str1.respond_to?(:force_encoding) | |
265 | str2.force_encoding("ASCII-8BIT") if str2.respond_to?(:force_encoding) |
|
265 | str2.force_encoding("ASCII-8BIT") if str2.respond_to?(:force_encoding) | |
266 | r = Repository::Bazaar.create!( |
|
266 | r = Repository::Bazaar.create!( | |
@@ -276,7 +276,7 class ChangesetTest < ActiveSupport::TestCase | |||||
276 | :committer => str2) |
|
276 | :committer => str2) | |
277 | assert( c.save ) |
|
277 | assert( c.save ) | |
278 | assert_equal "Texte encod? en ISO-8859-1.", c.comments |
|
278 | assert_equal "Texte encod? en ISO-8859-1.", c.comments | |
279 | assert_equal "?a?b?c?d?e", c.committer |
|
279 | assert_equal "?a?b?c?d?e test", c.committer | |
280 | end |
|
280 | end | |
281 |
|
281 | |||
282 | def test_invalid_utf8_sequences_in_comments_should_be_replaced_ja_jis |
|
282 | def test_invalid_utf8_sequences_in_comments_should_be_replaced_ja_jis | |
@@ -329,7 +329,7 class ChangesetTest < ActiveSupport::TestCase | |||||
329 | def test_invalid_utf8_sequences_in_paths_should_be_replaced |
|
329 | def test_invalid_utf8_sequences_in_paths_should_be_replaced | |
330 | proj = Project.find(3) |
|
330 | proj = Project.find(3) | |
331 | str1 = "Texte encod\xe9 en ISO-8859-1" |
|
331 | str1 = "Texte encod\xe9 en ISO-8859-1" | |
332 | str2 = "\xe9a\xe9b\xe9c\xe9d\xe9e" |
|
332 | str2 = "\xe9a\xe9b\xe9c\xe9d\xe9e test" | |
333 | str1.force_encoding("UTF-8") if str1.respond_to?(:force_encoding) |
|
333 | str1.force_encoding("UTF-8") if str1.respond_to?(:force_encoding) | |
334 | str2.force_encoding("ASCII-8BIT") if str2.respond_to?(:force_encoding) |
|
334 | str2.force_encoding("ASCII-8BIT") if str2.respond_to?(:force_encoding) | |
335 | r = Repository::Bazaar.create!( |
|
335 | r = Repository::Bazaar.create!( | |
@@ -352,7 +352,7 class ChangesetTest < ActiveSupport::TestCase | |||||
352 | :from_revision => "345") |
|
352 | :from_revision => "345") | |
353 | assert( ch.save ) |
|
353 | assert( ch.save ) | |
354 | assert_equal "Texte encod? en ISO-8859-1", ch.path |
|
354 | assert_equal "Texte encod? en ISO-8859-1", ch.path | |
355 | assert_equal "?a?b?c?d?e", ch.from_path |
|
355 | assert_equal "?a?b?c?d?e test", ch.from_path | |
356 | end |
|
356 | end | |
357 |
|
357 | |||
358 | def test_comments_nil |
|
358 | def test_comments_nil |
General Comments 0
You need to be logged in to leave comments.
Login now