ruby-changes:5553
From: ko1 <ko1@a...>
Date: Mon, 9 Jun 2008 21:11:57 +0900 (JST)
Subject: [ruby-changes:5553] Ruby:r17057 (trunk): * bootstraptest/test_knownbug.rb -> ./test_knownbug.rb: moved.
ko1 2008-06-09 21:10:43 +0900 (Mon, 09 Jun 2008) New Revision: 17057 Added files: trunk/test_knownbug.rb Removed files: trunk/bootstraptest/test_knownbug.rb Modified files: trunk/ChangeLog trunk/common.mk Log: * bootstraptest/test_knownbug.rb -> ./test_knownbug.rb: moved. * common.mk: add a rule "test-knownbug". http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17057&r2=17056&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test_knownbug.rb http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/common.mk?r1=17057&r2=17056&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/bootstraptest/test_knownbug.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 17056) +++ ChangeLog (revision 17057) @@ -1,3 +1,9 @@ +Mon Jun 9 21:09:02 2008 Koichi Sasada <ko1@a...> + + * bootstraptest/test_knownbug.rb -> ./test_knownbug.rb: moved. + + * common.mk: add a rule "test-knownbug". + Mon Jun 9 21:00:32 2008 Tadayoshi Funaba <tadf@d...> * complex.c (nucomp_s_convert): can accept Complex('i'). Index: bootstraptest/test_knownbug.rb =================================================================== --- bootstraptest/test_knownbug.rb (revision 17056) +++ bootstraptest/test_knownbug.rb (revision 17057) @@ -1,107 +0,0 @@ -# -# 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]' Index: common.mk =================================================================== --- common.mk (revision 17056) +++ common.mk (revision 17057) @@ -360,8 +360,11 @@ test-sample: miniruby$(EXEEXT) $(RBCONFIG) $(PROGRAM) PHONY @$(MINIRUBY) $(srcdir)/rubytest.rb -test: test-sample btest-miniruby +test-knownbug: miniruby$(EXEEXT) $(PROGRAM) PHONY + $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM)" $(srcdir)/test_knownbug.rb +test: test-sample btest-miniruby test-knownbug + test-all: $(RUNRUBY) "$(srcdir)/test/runner.rb" --basedir="$(TESTSDIR)" --runner=$(TESTUI) $(TESTS) Index: test_knownbug.rb =================================================================== --- test_knownbug.rb (revision 0) +++ test_knownbug.rb (revision 17057) @@ -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]' Property changes on: test_knownbug.rb ___________________________________________________________________ Name: svn:eol-style + LF -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/