From 119f82e8d40091cac587235014f655f3de913bd9 Mon Sep 17 00:00:00 2001 From: suke Date: Sat, 10 Feb 2007 11:29:49 +0000 Subject: * ext/win32ole/win32ole.c: add WIN32OLE#ole_query_interface. thanks to Mikael Pahmp. * test/win32ole/test_win32ole.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/win32ole/test_win32ole.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/win32ole/test_win32ole.rb b/test/win32ole/test_win32ole.rb index d7a9b368a..cf39c7681 100644 --- a/test/win32ole/test_win32ole.rb +++ b/test/win32ole/test_win32ole.rb @@ -237,6 +237,15 @@ if defined?(WIN32OLE) assert_equal(shell.NameSpace(0).title, shell._invoke(0x60020002, [0], [WIN32OLE::VARIANT::VT_VARIANT]).title) end + def test_ole_query_interface + shell=WIN32OLE.new('Shell.Application') + assert_raise(ArgumentError) { + shell2 = shell.ole_query_interface + } + shell2 = shell.ole_query_interface('{A4C6892C-3BA9-11D2-9DEA-00C04FB16162}') + assert_instance_of(WIN32OLE, shell2) + end + def test_s_const_load assert(!defined?(CONST1::SsfWINDOWS)) shell=WIN32OLE.new('Shell.Application') -- cgit