summaryrefslogtreecommitdiff
path: root/KNOWNBUGS.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-09 12:15:53 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-09 12:15:53 (GMT)
commite2958af0b78c2431b6127e8bc7f4397cf0b123b3 (patch)
treeea645b63035621d519ff63d7904ba5847d1a4636 /KNOWNBUGS.rb
parentce29c1787731c8172b5210479459e772aef03bc8 (diff)
* test_knownbug.rb -> KNOWNBUGS.rb: renamed.
* common.mk: apply above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'KNOWNBUGS.rb')
-rw-r--r--KNOWNBUGS.rb107
1 files changed, 107 insertions, 0 deletions
diff --git a/KNOWNBUGS.rb b/KNOWNBUGS.rb
new file mode 100644
index 0000000..f907467
--- /dev/null
+++ b/KNOWNBUGS.rb
@@ -0,0 +1,107 @@
+#
+# This test file concludes tests which point out known bugs.
+# So all tests will cause failure.
+#
+
+assert_equal 'ok', %q{
+ class C
+ define_method(:foo) {
+ if block_given?
+ :ng
+ else
+ :ok
+ end
+ }
+ end
+ C.new.foo {}
+}, '[ruby-core:14813]'
+
+assert_equal 'ok', %q{
+ class C
+ define_method(:foo) {
+ if block_given?
+ :ng
+ else
+ :ok
+ end
+ }
+ end
+ C.new.foo
+}, '[ruby-core:14813]'
+
+assert_equal 'ok', %q{
+ a = lambda {|x, y, &b| b }
+ b = a.curry[1]
+ if b.call(2){} == nil
+ :ng
+ else
+ :ok
+ end
+}, '[ruby-core:15551]'
+
+assert_normal_exit %q{
+ g = Module.enum_for(:new)
+ loop { g.next }
+}, '[ruby-dev:34128]'
+
+assert_normal_exit %q{
+ Fiber.new(&Object.method(:class_eval)).resume("foo")
+}, '[ruby-dev:34128]'
+
+assert_normal_exit %q{
+ Thread.new("foo", &Object.method(:class_eval)).join
+}, '[ruby-dev:34128]'
+
+assert_normal_exit %q{
+ g = enum_for(:local_variables)
+ loop { g.next }
+}, '[ruby-dev:34128]'
+
+assert_normal_exit %q{
+ g = enum_for(:block_given?)
+ loop { g.next }
+}, '[ruby-dev:34128]'
+
+assert_normal_exit %q{
+ g = enum_for(:binding)
+ loop { g.next }
+}, '[ruby-dev:34128]'
+
+assert_normal_exit %q{
+ g = "abc".enum_for(:scan, /./)
+ loop { g.next }
+}, '[ruby-dev:34128]'
+
+assert_equal %q{[:bar, :foo]}, %q{
+ def foo
+ klass = Class.new do
+ define_method(:bar) do
+ return :bar
+ end
+ end
+ [klass.new.bar, :foo]
+ end
+ foo
+}, "[ ruby-Bugs-19304 ]"
+
+assert_equal 'ok', %q{
+ lambda {
+ break :ok
+ :ng
+ }.call
+}, '[ruby-dev:34646]'
+
+assert_normal_exit %q{
+ eval("", method(:proc).call {}.binding)
+}
+
+assert_normal_exit %q{
+ a = []
+ 100.times {|i| a << i << nil << nil }
+ p a.compact!
+}
+
+assert_equal 'ok', %q{
+ a = [false]
+ (a[0] &&= true) == false ? :ok : :ng
+}, '[ruby-dev:34679]'