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
This commit is contained in:
parent
1ff52e5c5a
commit
b017a846ba
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue