summaryrefslogtreecommitdiff
path: root/test/win32ole
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-05 01:01:01 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-05 01:01:01 +0000
commit1890ae7aa957f75c7aeb64e4213c1a58c65b80d0 (patch)
tree591b617e616066028bd1ab2fdfe27c106200ae82 /test/win32ole
parent1a32af4e7a1527ebe6b4b1205c522fa9ebd56344 (diff)
* ext/win32ole/win32ole.c: add WIN32OLE#ole_respond_to?
* test/win32ole/test_win32ole.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/win32ole')
-rw-r--r--test/win32ole/test_win32ole.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/win32ole/test_win32ole.rb b/test/win32ole/test_win32ole.rb
index 0a9c50b..d7c1158 100644
--- a/test/win32ole/test_win32ole.rb
+++ b/test/win32ole/test_win32ole.rb
@@ -246,6 +246,16 @@ if defined?(WIN32OLE)
assert_instance_of(WIN32OLE, shell2)
end
+ def test_ole_respond_to
+ fso = WIN32OLE.new('Scripting.FileSystemObject')
+ assert(fso.ole_respond_to?('getFolder'))
+ assert(fso.ole_respond_to?('GETFOLDER'))
+ assert(!fso.ole_respond_to?('XXXXX'))
+ assert_raise(TypeError) {
+ assert_raise(fso.ole_respond_to?(1))
+ }
+ end
+
def test_s_const_load
assert(!defined?(CONST1::SsfWINDOWS))
shell=WIN32OLE.new('Shell.Application')