1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/win32ole/test_win32ole_variant.rb: setting WIN32OLE.locale

to pass some assertion.  Thanks to Hiroshi Shirosaki.
  [ruby-core:46873][Bug #6814]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
suke 2012-08-06 10:21:12 +00:00
parent 9537e8ffe5
commit 906b2110d9
2 changed files with 21 additions and 11 deletions

View file

@ -1,3 +1,9 @@
Mon Aug 6 19:15:11 2012 Masaki Suketa <masaki.suketa@nifty.ne.jp>
* test/win32ole/test_win32ole_variant.rb: setting WIN32OLE.locale
to pass some assertion. Thanks to Hiroshi Shirosaki.
[ruby-core:46873][Bug #6814]
Mon Aug 6 15:54:50 2012 Shugo Maeda <shugo@ruby-lang.org>
* internal.h, class.c, eval.c, insns.def: find the appropriate

View file

@ -7,6 +7,14 @@ require "test/unit"
if defined?(WIN32OLE_VARIANT)
class TestWIN32OLE_VARIANT < Test::Unit::TestCase
def setup
@orglocale = WIN32OLE.locale
WIN32OLE.locale = 0x0409 # set locale US-Eng
end
def teardown
WIN32OLE.locale = @orglocale
end
def test_s_new
obj = WIN32OLE_VARIANT.new('foo')
@ -390,17 +398,13 @@ if defined?(WIN32OLE_VARIANT)
def test_conversion_str2cy
begin
begin
WIN32OLE.locale = 0x0411 # set locale Japanese
rescue WIN32OLERuntimeError
skip("Japanese locale is not installed")
end
if WIN32OLE.locale == 0x0411
obj = WIN32OLE_VARIANT.new("\\10,000", WIN32OLE::VARIANT::VT_CY)
assert_equal("10000", obj.value)
end
ensure
WIN32OLE.locale = WIN32OLE::LOCALE_SYSTEM_DEFAULT
WIN32OLE.locale = 0x0411 # set locale Japanese
rescue WIN32OLERuntimeError
skip("Japanese locale is not installed")
end
if WIN32OLE.locale == 0x0411
obj = WIN32OLE_VARIANT.new("\\10,000", WIN32OLE::VARIANT::VT_CY)
assert_equal("10000", obj.value)
end
end