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.rb (test_s_codepage_changed,

test_s_locale_set, test_s_locale_change): skip test if Japanese
  locale is not installed. [ruby-core:23806]
	
* test/win32ole/test_win32ole_variant.rb (test_conversion_str2cy):
  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
suke 2009-07-16 12:06:23 +00:00
parent 1c75d58165
commit 6d7ddc3b29
3 changed files with 57 additions and 17 deletions

View file

@ -384,9 +384,15 @@ if defined?(WIN32OLE_VARIANT)
def test_conversion_str2cy
begin
WIN32OLE.locale = 0x0411 # set locale Japanese
obj = WIN32OLE_VARIANT.new("\\10,000", WIN32OLE::VARIANT::VT_CY)
assert_equal("10000", obj.value)
begin
WIN32OLE.locale = 0x0411 # set locale Japanese
rescue WIN32OLERuntimeError
STDERR.puts("\n#{__FILE__}:#{__LINE__}:#{self.class.name}.test_conversion_str2cy is skipped(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
end