diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-08-31 03:06:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-08-31 03:06:05 +0000 |
commit | 54217d68b3efc40d03ff50fbec5289288fedbf66 (patch) | |
tree | d32814cf185ab40b0b5614005a91f4cb933ed4e9 /test/ruby | |
parent | 8560376071ccb9924b70b8542de12214b4c9462f (diff) | |
download | ruby-54217d68b3efc40d03ff50fbec5289288fedbf66.tar.gz |
test_syntax.rb: assert output
* test/ruby/test_syntax.rb (TestSyntax#test_return_toplevel):
assert expected output if given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_syntax.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index e2b5e0146e..561c45a6c6 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -998,13 +998,10 @@ eom 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 |