diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-30 17:14:27 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-30 17:14:27 +0000 |
commit | a1d837ccc1ff4b41f385fe0a167ae67cee1bcdd8 (patch) | |
tree | af703d233beae43f1816ad07d3e4a67557927e26 | |
parent | 8f9b451dd8260417fa57f88c6df09e41535d3c2b (diff) | |
download | ruby-a1d837ccc1ff4b41f385fe0a167ae67cee1bcdd8.tar.gz |
* test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err): raise if assert_in_out_err misused.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | test/ruby/envutil.rb | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Sat Dec 1 02:04:23 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com> + + * test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err): + raise if assert_in_out_err misused. + Sat Dec 1 02:08:16 2012 NAKAMURA Usaku <usa@ruby-lang.org> * test/rdoc/test_rdoc_rubygems_hook.rb diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index 73fde74881..9e527e90b1 100644 --- a/test/ruby/envutil.rb +++ b/test/ruby/envutil.rb @@ -166,6 +166,8 @@ module Test def assert_in_out_err(args, test_stdin = "", test_stdout = [], test_stderr = [], message = nil, opt={}) stdout, stderr, status = EnvUtil.invoke_ruby(args, test_stdin, true, true, opt) if block_given? + raise "test_stdout ignored, use block only or without block" if test_stdout != [] + raise "test_stderr ignored, use block only or without block" if test_stderr != [] yield(stdout.lines.map {|l| l.chomp }, stderr.lines.map {|l| l.chomp }) else if test_stdout.is_a?(Regexp) |