mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_rubyoptions.rb (test_search): enable some assertions.
* test/ruby/test_rubyoptions.rb: flunk message in win32. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f23828fa12
commit
6f4fb0981d
2 changed files with 18 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Thu Apr 17 20:12:47 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
|
* test/ruby/test_rubyoptions.rb (test_search): enable some assertions.
|
||||||
|
|
||||||
|
* test/ruby/test_rubyoptions.rb: flunk message in win32.
|
||||||
|
|
||||||
Thu Apr 17 16:07:12 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Thu Apr 17 16:07:12 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* test/ruby/test_rubyoptions.rb (ruby): run in C locale.
|
* test/ruby/test_rubyoptions.rb (ruby): run in C locale.
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
|
|
||||||
unless /(mswin|bccwin|mingw|emx)/ =~ RUBY_PLATFORM
|
|
||||||
|
|
||||||
require 'timeout'
|
require 'timeout'
|
||||||
require 'tmpdir'
|
require 'tmpdir'
|
||||||
require 'tempfile'
|
require 'tempfile'
|
||||||
|
@ -9,6 +7,9 @@ require 'open3'
|
||||||
require_relative 'envutil'
|
require_relative 'envutil'
|
||||||
|
|
||||||
class TestRubyOptions < Test::Unit::TestCase
|
class TestRubyOptions < Test::Unit::TestCase
|
||||||
|
|
||||||
|
unless /(mswin|bccwin|mingw|emx)/ =~ RUBY_PLATFORM
|
||||||
|
|
||||||
LANG_ENVS = %w"LANG LC_ALL LC_CTYPE"
|
LANG_ENVS = %w"LANG LC_ALL LC_CTYPE"
|
||||||
def ruby(*args)
|
def ruby(*args)
|
||||||
ruby = EnvUtil.rubybin
|
ruby = EnvUtil.rubybin
|
||||||
|
@ -412,15 +413,15 @@ class TestRubyOptions < Test::Unit::TestCase
|
||||||
ENV['PATH'] = File.dirname(t.path)
|
ENV['PATH'] = File.dirname(t.path)
|
||||||
|
|
||||||
ruby('-S', File.basename(t.path)) do |w, r, e|
|
ruby('-S', File.basename(t.path)) do |w, r, e|
|
||||||
# assert_equal('', e.read)
|
assert_equal('', e.read)
|
||||||
# assert_equal('1', r.read)
|
assert_equal('1', r.read.chomp)
|
||||||
end
|
end
|
||||||
|
|
||||||
ENV['RUBYPATH'] = File.dirname(t.path)
|
ENV['RUBYPATH'] = File.dirname(t.path)
|
||||||
|
|
||||||
ruby('-S', File.basename(t.path)) do |w, r, e|
|
ruby('-S', File.basename(t.path)) do |w, r, e|
|
||||||
# assert_equal('', e.read)
|
assert_equal('', e.read)
|
||||||
# assert_equal('1', r.read)
|
assert_equal('1', r.read.chomp)
|
||||||
end
|
end
|
||||||
|
|
||||||
ensure
|
ensure
|
||||||
|
@ -483,10 +484,13 @@ class TestRubyOptions < Test::Unit::TestCase
|
||||||
assert_equal('', r.read.chomp)
|
assert_equal('', r.read.chomp)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
flunk("cannot test in win32")
|
def test_win32
|
||||||
|
flunk("cannot test in win32")
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue