diff options
author | suke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-31 07:59:58 +0000 |
---|---|---|
committer | suke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-31 07:59:58 +0000 |
commit | c6cf2e24fe9895b84308374017100cb77900d6db (patch) | |
tree | fcf76c44c5a09f4f80110215eb04369ce137096a /ext/win32ole/tests | |
parent | 6d63dce6cb1a228182eeb6cc8f8c76afec5cfc49 (diff) | |
download | ruby-c6cf2e24fe9895b84308374017100cb77900d6db.tar.gz |
add WIN32OLE.codepage, WIN32OLE.codepage=
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole/tests')
-rw-r--r-- | ext/win32ole/tests/testWIN32OLE.rb | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/ext/win32ole/tests/testWIN32OLE.rb b/ext/win32ole/tests/testWIN32OLE.rb index 7611da84ac..d0705093f3 100644 --- a/ext/win32ole/tests/testWIN32OLE.rb +++ b/ext/win32ole/tests/testWIN32OLE.rb @@ -41,7 +41,7 @@ class TestWin32OLE < RUNIT::TestCase exc = assert_exception(WIN32OLERuntimeError) { WIN32OLE.new("{000}") } - assert_match(/Unknown OLE server `\{000\}'/, exc.message) + assert_match(/Unknown OLE server: `\{000\}'/, exc.message) end def test_s_connect excel2 = WIN32OLE.connect('Excel.Application') @@ -58,6 +58,44 @@ class TestWin32OLE < RUNIT::TestCase assert_equal(-4160, CONST1::XlTop) end + def test_s_codepage + assert_equal(WIN32OLE::CP_ACP, WIN32OLE.codepage) + end + + def test_s_codepage_set + WIN32OLE.codepage = WIN32OLE::CP_UTF8 + assert_equal(WIN32OLE::CP_UTF8, WIN32OLE.codepage) + WIN32OLE.codepage = WIN32OLE::CP_ACP + end + + def test_const_CP_ACP + assert_equal(0, WIN32OLE::CP_ACP) + end + + def test_const_CP_OEMCP + assert_equal(1, WIN32OLE::CP_OEMCP) + end + + def test_const_CP_MACCP + assert_equal(2, WIN32OLE::CP_MACCP) + end + + def test_const_CP_THREAD_ACP + assert_equal(3, WIN32OLE::CP_THREAD_ACP) + end + + def test_const_CP_SYMBOL + assert_equal(42, WIN32OLE::CP_SYMBOL) + end + + def test_const_CP_UTF7 + assert_equal(65000, WIN32OLE::CP_UTF7) + end + + def test_const_CP_UTF8 + assert_equal(65001, WIN32OLE::CP_UTF8) + end + def test_get_win32ole_object workbooks = @excel.Workbooks; assert_instance_of(WIN32OLE, workbooks) |