diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-30 12:51:59 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-01-30 12:51:59 +0000 |
commit | e2a553e4734b17be9378b8120ad3bb7f818789c5 (patch) | |
tree | de9c37e6aecec290d63666964cc5da9848e4c738 | |
parent | 495670d273617cc0874ca53d748bff5f3849d1e4 (diff) |
merges r25435 from trunk into ruby_1_9_1.
--
* test/ruby/envutil.rb (assert_in_out_err): test_stdout and
test_stderr should be an array.
* test/ruby/test_rubyoptions.rb (test_notfound): test_stdin of
assert_in_out_err should be a string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | test/ruby/envutil.rb | 2 | ||||
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 9 | ||||
-rw-r--r-- | version.h | 2 |
4 files changed, 19 insertions, 2 deletions
@@ -1,3 +1,11 @@ +Thu Oct 22 20:20:27 2009 Tanaka Akira <akr@fsij.org> + + * test/ruby/envutil.rb (assert_in_out_err): test_stdout and + test_stderr should be an array. + + * test/ruby/test_rubyoptions.rb (test_notfound): test_stdin of + assert_in_out_err should be a string. + Tue Oct 20 16:41:18 2009 NAKAMURA Usaku <usa@ruby-lang.org> * include/ruby/win32.h (finite, scalb): inline'ed non-standard diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index 4aba8a0bde..04ab09e03c 100644 --- a/test/ruby/envutil.rb +++ b/test/ruby/envutil.rb @@ -115,7 +115,7 @@ module Test end LANG_ENVS = %w"LANG LC_ALL LC_CTYPE" - def assert_in_out_err(args, test_stdin = "", test_stdout = "", test_stderr = "", message = nil) + def assert_in_out_err(args, test_stdin = "", test_stdout = [], test_stderr = [], message = nil) in_c, in_p = IO.pipe out_p, out_c = IO.pipe err_p, err_c = IO.pipe diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 6db7ff32c4..b8bdb9b5cb 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -295,4 +295,13 @@ class TestRubyOptions < Test::Unit::TestCase ensure t.close(true) if t end + + def test_notfound + notexist = "./notexist.rb" + rubybin = Regexp.quote(EnvUtil.rubybin) + pat = /\A#{rubybin}:.* -- #{Regexp.quote(notexist)} \(LoadError\)\Z/ + assert_equal(false, File.exist?(notexist)) + assert_in_out_err(["-r", notexist, "-ep"], "", [], pat) + assert_in_out_err([notexist], "", [], pat) + end end @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.1" -#define RUBY_PATCHLEVEL 405 +#define RUBY_PATCHLEVEL 406 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 |