##// END OF EJS Templates
scm: fix indents of test/unit/changeset_test.rb....
Toshi MARUYAMA -
r5591:23a27bd6e413
parent child
Show More
@@ -327,32 +327,32 class ChangesetTest < ActiveSupport::TestCase
327 end
327 end
328
328
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 test"
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!(
336 :project => proj,
336 :project => proj,
337 :url => '/tmp/test/bazaar',
337 :url => '/tmp/test/bazaar',
338 :log_encoding => 'UTF-8' )
338 :log_encoding => 'UTF-8' )
339 assert r
339 assert r
340 cs = Changeset.new(
340 cs = Changeset.new(
341 :repository => r,
341 :repository => r,
342 :committed_on => Time.now,
342 :committed_on => Time.now,
343 :revision => '123',
343 :revision => '123',
344 :scmid => '12345',
344 :scmid => '12345',
345 :comments => "test")
345 :comments => "test")
346 assert( cs.save )
346 assert(cs.save)
347 ch = Change.new(
347 ch = Change.new(
348 :changeset => cs,
348 :changeset => cs,
349 :action => "A",
349 :action => "A",
350 :path => str1,
350 :path => str1,
351 :from_path => str2,
351 :from_path => str2,
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 test", 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