summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--test/digest/test_digest.rb6
-rw-r--r--test/ruby/test_iterator.rb21
3 files changed, 31 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6b2311a961..a94843f469 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Oct 16 08:38:06 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/digest/test_digest.rb (test_eq): show failed class.
+
+ * test/ruby/test_iterator.rb (test_break, test_return_trace_func):
+ test localjump destination.
+
Wed Oct 15 20:22:31 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org>
* lib/soap/netHttpClient.rb: use URI::HTTP#request_uri instead of
diff --git a/test/digest/test_digest.rb b/test/digest/test_digest.rb
index 51865aa961..89f0660fc8 100644
--- a/test/digest/test_digest.rb
+++ b/test/digest/test_digest.rb
@@ -76,16 +76,16 @@ class TestDigest < Test::Unit::TestCase
ALGOS.each do |algo|
md1 = algo.new("ABC")
- assert_equal(md1, md1.clone)
+ assert_equal(md1, md1.clone, algo)
md2 = algo.new
md2 << "A"
- assert(md1 != md2)
+ assert(md1 != md2, algo)
md2 << "BC"
- assert_equal(md1, md2)
+ assert_equal(md1, md2, algo)
end
end
end
diff --git a/test/ruby/test_iterator.rb b/test/ruby/test_iterator.rb
index 9a5b9c5352..f91bf81644 100644
--- a/test/ruby/test_iterator.rb
+++ b/test/ruby/test_iterator.rb
@@ -403,4 +403,25 @@ class TestIterator < Test::Unit::TestCase
end
assert(false, "must not reach here")
end
+
+ def test_break_from_enum
+ result = ["a"].inject("ng") {|x,y| break "ok"}
+ assert_equal("ok", result)
+ end
+
+ def _test_return_trace_func(x)
+ set_trace_func(proc {})
+ [].fetch(2) {return x}
+ ensure
+ set_trace_func(nil)
+ end
+
+ def test_return_trace_func
+ ok = "returned gracefully"
+ result = "skipped"
+ result = _test_return_from_builtin(ok)
+ ensure
+ assert_equal(ok, result)
+ return
+ end
end