summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-29 17:59:03 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-29 17:59:03 +0000
commit8dd358330b86a32a912e79190a0fd608a5ac2992 (patch)
tree16419cfea4aa72c27d7c5455454f644311f57c47
parentb6669923259540c8d3a910b15e03e5fef1a52e86 (diff)
downloadruby-8dd358330b86a32a912e79190a0fd608a5ac2992.tar.gz
ruby-8dd358330b86a32a912e79190a0fd608a5ac2992.tar.xz
ruby-8dd358330b86a32a912e79190a0fd608a5ac2992.zip
* test/ruby/test_iterator.rb: new test test_break__nested_loop[123].
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_iterator.rb39
2 files changed, 44 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d3b956f0c..4c507514c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Sep 30 02:54:49 2003 Minero Aoki <aamine@loveruby.net>
+
+ * test/ruby/test_iterator.rb: new test
+ test_break__nested_loop[123].
+
Mon Sep 29 23:39:13 2003 Minero Aoki <aamine@loveruby.net>
* lib/net/http.rb (finish): does not raise IOError even if
diff --git a/test/ruby/test_iterator.rb b/test/ruby/test_iterator.rb
index 83bfb2525..d05309adf 100644
--- a/test/ruby/test_iterator.rb
+++ b/test/ruby/test_iterator.rb
@@ -359,4 +359,43 @@ class TestIterator < Test::Unit::TestCase
def test_iter4
ITER_TEST4.new.foo(44){55}
end
+
+ def test_break__nested_loop1
+ _test_break__nested_loop1 do
+ break
+ end
+ end
+
+ def _test_break__nested_loop1
+ while true
+ yield
+ end
+ assert(false, "must not reach here")
+ end
+
+ def test_break__nested_loop2
+ _test_break__nested_loop2 do
+ break
+ end
+ end
+
+ def _test_break__nested_loop2
+ until false
+ yield
+ end
+ assert(false, "must not reach here")
+ end
+
+ def test_break__nested_loop3
+ _test_break__nested_loop3 do
+ break
+ end
+ end
+
+ def _test_break__nested_loop3
+ loop do
+ yield
+ end
+ assert(false, "must not reach here")
+ end
end