2016-05-16 06:07:49 +08:00
|
|
|
--- subversion/bindings/swig/ruby/test/my-assertions.rb 2016-05-15 22:17:33.293873010 +0100
|
|
|
|
+++ subversion/bindings/swig/ruby/test/my-assertions.rb 2016-05-15 22:18:28.058156321 +0100
|
|
|
|
@@ -24,39 +24,13 @@
|
2015-04-10 22:19:52 +08:00
|
|
|
module Unit
|
|
|
|
module Assertions
|
|
|
|
|
|
|
|
- # make an intermediary assertion block handler
|
|
|
|
- def _my_assert_block(&block)
|
|
|
|
- if RUBY_VERSION > '1.9'
|
2016-05-16 06:07:49 +08:00
|
|
|
- yield
|
2015-04-10 22:19:52 +08:00
|
|
|
- else
|
|
|
|
- _wrap_assertion do
|
|
|
|
- yield
|
|
|
|
- end
|
|
|
|
- end
|
|
|
|
- end
|
|
|
|
-
|
|
|
|
- def assert_true(boolean, message=nil)
|
|
|
|
- _my_assert_block do
|
|
|
|
- assert_equal(true, boolean, message)
|
|
|
|
- end
|
|
|
|
- end
|
|
|
|
-
|
|
|
|
- def assert_false(boolean, message=nil)
|
|
|
|
- _my_assert_block do
|
|
|
|
- assert_equal(false, boolean, message)
|
|
|
|
- end
|
|
|
|
- end
|
|
|
|
-
|
|
|
|
def assert_nested_sorted_array(expected, actual, message=nil)
|
|
|
|
- _my_assert_block do
|
|
|
|
assert_equal(expected.collect {|elem| elem.sort},
|
|
|
|
actual.collect {|elem| elem.sort},
|
|
|
|
message)
|
|
|
|
- end
|
|
|
|
end
|
|
|
|
|
|
|
|
def assert_equal_log_entries(expected, actual, message=nil)
|
|
|
|
- _my_assert_block do
|
|
|
|
actual = actual.collect do |entry|
|
|
|
|
changed_paths = entry.changed_paths
|
|
|
|
changed_paths.each_key do |path|
|
2016-05-16 06:07:49 +08:00
|
|
|
@@ -71,7 +45,6 @@
|
2015-04-10 22:19:52 +08:00
|
|
|
entry.has_children?]
|
|
|
|
end
|
|
|
|
assert_equal(expected, actual, message)
|
|
|
|
- end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2016-05-16 06:07:49 +08:00
|
|
|
--- subversion/bindings/swig/ruby/test/test-unit-ext.rb 2016-05-15 22:17:33.293873010 +0100
|
|
|
|
+++ subversion/bindings/swig/ruby/test/test-unit-ext.rb 2016-05-15 22:18:42.015065065 +0100
|
2015-04-10 22:19:52 +08:00
|
|
|
@@ -18,6 +18,6 @@
|
|
|
|
# ====================================================================
|
|
|
|
|
|
|
|
require "test-unit-ext/always-show-result" if RUBY_VERSION < '1.9.3'
|
|
|
|
-require "test-unit-ext/priority"
|
|
|
|
+#require "test-unit-ext/priority"
|
|
|
|
require "test-unit-ext/backtrace-filter" if RUBY_VERSION < '1.9.3'
|
|
|
|
require "test-unit-ext/long-display-for-emacs" if RUBY_VERSION < '1.9.3'
|
2016-05-16 06:07:49 +08:00
|
|
|
--- subversion/bindings/swig/ruby/test/test_delta.rb 2016-05-15 22:17:33.293873010 +0100
|
|
|
|
+++ subversion/bindings/swig/ruby/test/test_delta.rb 2016-05-15 22:19:19.519048836 +0100
|
|
|
|
@@ -48,7 +48,6 @@
|
2015-04-10 22:19:52 +08:00
|
|
|
target = StringIO.new(t)
|
|
|
|
stream = Svn::Delta::TextDeltaStream.new(source, target)
|
|
|
|
assert_nil(stream.md5_digest)
|
|
|
|
- _my_assert_block do
|
|
|
|
ret = stream.each do |window|
|
|
|
|
window.ops.each do |op|
|
|
|
|
op_size = op.offset + op.length
|
2016-05-16 06:07:49 +08:00
|
|
|
@@ -64,8 +63,6 @@
|
2015-04-10 22:19:52 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
- true if RUBY_VERSION > '1.9' # this block returns nil in > ruby '1.9'
|
|
|
|
- end
|
|
|
|
assert_equal(Digest::MD5.hexdigest(t), stream.md5_digest)
|
|
|
|
end
|
|
|
|
|
2016-05-16 06:07:49 +08:00
|
|
|
@@ -84,7 +81,6 @@
|
2015-04-10 22:19:52 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
- _my_assert_block do
|
|
|
|
composed_window.ops.each do |op|
|
|
|
|
op_size = op.offset + op.length
|
|
|
|
case op.action_code
|
2016-05-16 06:07:49 +08:00
|
|
|
@@ -98,7 +94,6 @@
|
2015-04-10 22:19:52 +08:00
|
|
|
flunk
|
|
|
|
end
|
|
|
|
end
|
|
|
|
- end
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_txdelta_apply_instructions
|
2016-05-16 06:07:49 +08:00
|
|
|
--- subversion/bindings/swig/ruby/test/test_repos.rb 2016-05-15 22:17:33.293873010 +0100
|
|
|
|
+++ subversion/bindings/swig/ruby/test/test_repos.rb 2016-05-15 22:19:48.019543071 +0100
|
|
|
|
@@ -678,7 +678,8 @@
|
2015-04-10 22:19:52 +08:00
|
|
|
|
|
|
|
dest_path = File.join(@tmp_path, "dest")
|
|
|
|
Svn::Repos.create(dest_path) do |repos|
|
|
|
|
- assert_raises(NoMethodError) do
|
|
|
|
+ assert_raises(RuntimeError) do
|
2016-05-16 06:07:49 +08:00
|
|
|
+ # Can't modify frozen object
|
2015-04-10 22:19:52 +08:00
|
|
|
repos.load_fs(nil)
|
|
|
|
end
|
|
|
|
end
|
2016-05-16 06:07:49 +08:00
|
|
|
--- subversion/bindings/swig/ruby/test/test_wc.rb 2016-05-15 22:17:33.293873010 +0100
|
|
|
|
+++ subversion/bindings/swig/ruby/test/test_wc.rb 2016-05-15 22:20:41.400468645 +0100
|
|
|
|
@@ -411,7 +411,7 @@
|
2015-04-10 22:19:52 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
- def test_status
|
|
|
|
+ def test_status2
|
|
|
|
source = "source"
|
|
|
|
file1 = "file1"
|
|
|
|
file2 = "file2"
|
2016-05-16 06:07:49 +08:00
|
|
|
@@ -534,7 +534,6 @@
|
2015-04-10 22:19:52 +08:00
|
|
|
ctx.ci(lf_path)
|
|
|
|
|
|
|
|
Svn::Wc::AdmAccess.open(nil, @wc_path, true, 5) do |access|
|
|
|
|
- _my_assert_block do
|
|
|
|
File.open(src_path, "wb") {|f| f.print(source)}
|
|
|
|
args = [method_name, src_path, crlf_path, Svn::Wc::TRANSLATE_FROM_NF]
|
|
|
|
result = yield(access.send(*args), source)
|
2016-05-16 06:07:49 +08:00
|
|
|
@@ -553,7 +552,6 @@
|
2015-04-10 22:19:52 +08:00
|
|
|
result ||= File.open(src_path, "rb") {|f| f.read}
|
|
|
|
assert_equal(lf_source, result)
|
|
|
|
end
|
|
|
|
- end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|