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