summaryrefslogtreecommitdiff
path: root/test/win32ole
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-16 14:55:42 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-16 14:55:42 +0000
commitde1324fb7fa3ca0e68b7732e688b169c44fea4c7 (patch)
tree70055690e4466f2e1fe9dad7837b5524fda2db33 /test/win32ole
parentfd9c3fef0b2bb1e7110b17ff4157d384438ff58d (diff)
* test/win32ole/test_folderitem2_invokeverb.rb (test_invokeverb):
run test only when "Create Shortcut (&S)" menu is found. [ruby-core:29550] [Bug #1602] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/win32ole')
-rw-r--r--test/win32ole/test_folderitem2_invokeverb.rb24
1 files changed, 13 insertions, 11 deletions
diff --git a/test/win32ole/test_folderitem2_invokeverb.rb b/test/win32ole/test_folderitem2_invokeverb.rb
index 5a5d475..e5380ca 100644
--- a/test/win32ole/test_folderitem2_invokeverb.rb
+++ b/test/win32ole/test_folderitem2_invokeverb.rb
@@ -60,19 +60,21 @@ if defined?(WIN32OLE)
end
def test_invokeverb
- links = find_link(@dummy_path)
- assert(0, links.size)
+ # this test should run only when "Create Shortcut (&S)"
+ # is found in context menu,
+ if @shortcut
+ links = find_link(@dummy_path)
+ assert(0, links.size)
- assert(@shortcut)
+ # Now create shortcut to @dummy_path
+ arg = WIN32OLE_VARIANT.new(@shortcut)
+ @fi2.InvokeVerb(arg)
- # Now create shortcut to @dummy_path
- arg = WIN32OLE_VARIANT.new(@shortcut)
- @fi2.InvokeVerb(arg)
-
- # Now search shortcut to @dummy_path
- links = find_link(@dummy_path)
- assert(1, links.size)
- @lpath = links[0].path
+ # Now search shortcut to @dummy_path
+ links = find_link(@dummy_path)
+ assert(1, links.size)
+ @lpath = links[0].path
+ end
end
def teardown