ruby-changes:47581
From: nobu <ko1@a...>
Date: Thu, 31 Aug 2017 12:06:11 +0900 (JST)
Subject: [ruby-changes:47581] nobu:r59697 (trunk): test_syntax.rb: assert output
nobu 2017-08-31 12:06:05 +0900 (Thu, 31 Aug 2017) New Revision: 59697 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59697 Log: test_syntax.rb: assert output * test/ruby/test_syntax.rb (TestSyntax#test_return_toplevel): assert expected output if given. Modified files: trunk/test/ruby/test_syntax.rb Index: test/ruby/test_syntax.rb =================================================================== --- test/ruby/test_syntax.rb (revision 59696) +++ test/ruby/test_syntax.rb (revision 59697) @@ -998,13 +998,10 @@ eom https://github.com/ruby/ruby/blob/trunk/test/ruby/test_syntax.rb#L998 begin raise; ensure return; end and self nil&defined?0--begin e=no_method_error(); return; 0;end end; - all_assertions(feature4840) do |a| - code.each_line do |s| - s.chomp! - a.for(s) do - assert_ruby_status([], s, proc {RubyVM::InstructionSequence.compile(s).disasm}) - end - end + all_assertions_foreach(feature4840, *code.split(/\n/)) do |s| + assert_in_out_err([], s, [*s[/#=> (.*)/, 1]], [], + proc {RubyVM::InstructionSequence.compile(s).disasm}, + success: true) end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/