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 2285d92b..d7b9c882 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