From: Toshi MARUYAMA Date: Sun, 9 Jan 2011 14:19:39 +0000 (+0000) Subject: scm: mercurial: remove new line in diff unit test(#7253). X-Git-Tag: 1.2.0~1109 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b017a846ba7354555da6de892651fe9723b7ffb6;p=redmine.git scm: mercurial: remove new line in diff unit test(#7253). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4669 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb index 2285d92b6..d7b9c882f 100644 --- a/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb +++ b/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb @@ -48,14 +48,17 @@ begin [2, '400bb8672109', '400', 400].each do |r1| diff1 = @adapter.diff(nil, r1) assert_equal 28, diff1.size - assert_equal "+ return true unless klass.respond_to?('watched_by')\r\n", diff1[24] + buf = diff1[24].gsub(/\r\n|\r|\n/, "") + assert_equal "+ return true unless klass.respond_to?('watched_by')", buf [4, 'def6d2f1254a'].each do |r2| diff2 = @adapter.diff(nil,r1,r2) assert_equal 50, diff2.size - assert_equal "+class WelcomeController < ApplicationController\r\n", diff2[42] + buf = diff2[42].gsub(/\r\n|\r|\n/, "") + assert_equal "+class WelcomeController < ApplicationController", buf diff3 = @adapter.diff('sources/watchers_controller.rb', r1, r2) assert_equal 20, diff3.size - assert_equal "+ @watched.remove_watcher(user)\r\n", diff3[12] + buf = diff3[12].gsub(/\r\n|\r|\n/, "") + assert_equal "+ @watched.remove_watcher(user)", buf end end end