summaryrefslogtreecommitdiff
path: root/test/win32ole/test_word.rb
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-25 08:21:29 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-25 08:21:29 +0000
commitafdc2b89bd11699fc44a473c8f890e175c728f52 (patch)
treea2e40fb9f75a690826c4856180fbd99d5d96b8a4 /test/win32ole/test_word.rb
parent38321af30c6c797262c1e8c24da74d979dc88028 (diff)
support some kind of method of word. [ruby-Bugs#3237]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/win32ole/test_word.rb')
-rw-r--r--test/win32ole/test_word.rb37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/win32ole/test_word.rb b/test/win32ole/test_word.rb
new file mode 100644
index 0000000..4990480
--- /dev/null
+++ b/test/win32ole/test_word.rb
@@ -0,0 +1,37 @@
+#
+# This is test for [ruby-Bugs#3237]
+#
+begin
+ require 'win32ole'
+rescue LoadError
+end
+require "test/unit"
+
+if defined?(WIN32OLE)
+ class TestWIN32OLE_WORD < Test::Unit::TestCase
+
+ def setup
+ begin
+ @obj = WIN32OLE.new('Word.Application')
+ rescue WIN32OLERuntimeError
+ @obj = nil
+ end
+ end
+
+ def test_ole_methods
+ if @obj
+ @obj.visible = true
+ @obj.wordbasic.disableAutoMacros(true)
+ assert(true)
+ end
+ end
+
+ def teardown
+ if @obj
+ @obj.quit
+ @obj = nil
+ end
+ end
+
+ end
+end