From b84ff5ccb390581242c34f67453802c34b97dcea Mon Sep 17 00:00:00 2001 From: suke Date: Sun, 7 Jan 2007 08:56:04 +0000 Subject: add some test. update comment for rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/win32ole/test_win32ole.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/win32ole') diff --git a/test/win32ole/test_win32ole.rb b/test/win32ole/test_win32ole.rb index f1bdb2c208..df7a9abfd7 100644 --- a/test/win32ole/test_win32ole.rb +++ b/test/win32ole/test_win32ole.rb @@ -40,5 +40,19 @@ if defined?(WIN32OLE) name = folder.getDetailsOf({"vItem" => item, :iColumn => 0}) assert_equal(item.name, name) end + + def test_bracket + dict = WIN32OLE.new('Scripting.Dictionary') + dict.add("foo", "FOO") + assert_equal("FOO", dict.item("foo")) + assert_equal("FOO", dict["foo"]) + end + + def test_bracket_equal + dict = WIN32OLE.new('Scripting.Dictionary') + dict.add("foo", "FOO") + dict["foo"] = "BAR" + assert_equal("BAR", dict["foo"]) + end end end -- cgit v1.2.3