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:
parent
9537e8ffe5
commit
906b2110d9
2 changed files with 21 additions and 11 deletions
|
@ -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>
|
Mon Aug 6 15:54:50 2012 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
* internal.h, class.c, eval.c, insns.def: find the appropriate
|
* internal.h, class.c, eval.c, insns.def: find the appropriate
|
||||||
|
|
|
@ -7,6 +7,14 @@ require "test/unit"
|
||||||
if defined?(WIN32OLE_VARIANT)
|
if defined?(WIN32OLE_VARIANT)
|
||||||
|
|
||||||
class TestWIN32OLE_VARIANT < Test::Unit::TestCase
|
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
|
def test_s_new
|
||||||
obj = WIN32OLE_VARIANT.new('foo')
|
obj = WIN32OLE_VARIANT.new('foo')
|
||||||
|
@ -389,7 +397,6 @@ if defined?(WIN32OLE_VARIANT)
|
||||||
# end
|
# end
|
||||||
|
|
||||||
def test_conversion_str2cy
|
def test_conversion_str2cy
|
||||||
begin
|
|
||||||
begin
|
begin
|
||||||
WIN32OLE.locale = 0x0411 # set locale Japanese
|
WIN32OLE.locale = 0x0411 # set locale Japanese
|
||||||
rescue WIN32OLERuntimeError
|
rescue WIN32OLERuntimeError
|
||||||
|
@ -399,9 +406,6 @@ if defined?(WIN32OLE_VARIANT)
|
||||||
obj = WIN32OLE_VARIANT.new("\\10,000", WIN32OLE::VARIANT::VT_CY)
|
obj = WIN32OLE_VARIANT.new("\\10,000", WIN32OLE::VARIANT::VT_CY)
|
||||||
assert_equal("10000", obj.value)
|
assert_equal("10000", obj.value)
|
||||||
end
|
end
|
||||||
ensure
|
|
||||||
WIN32OLE.locale = WIN32OLE::LOCALE_SYSTEM_DEFAULT
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_create_vt_array
|
def test_create_vt_array
|
||||||
|
|
Loading…
Add table
Reference in a new issue