diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-01-09 14:19:39 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-01-09 14:19:39 +0000 |
commit | b017a846ba7354555da6de892651fe9723b7ffb6 (patch) | |
tree | 70bace47f692fa400016a253d9be40da6c891a93 /test | |
parent | 1ff52e5c5a58cd9cfe6f5c73f0af293673a095bf (diff) | |
download | redmine-b017a846ba7354555da6de892651fe9723b7ffb6.tar.gz redmine-b017a846ba7354555da6de892651fe9723b7ffb6.zip |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb | 9 |
1 files changed, 6 insertions, 3 deletions
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 |