From de1324fb7fa3ca0e68b7732e688b169c44fea4c7 Mon Sep 17 00:00:00 2001 From: suke Date: Fri, 16 Apr 2010 14:55:42 +0000 Subject: [PATCH] * 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 --- ChangeLog | 6 +++++ test/win32ole/test_folderitem2_invokeverb.rb | 24 +++++++++++--------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index c20626e385..772104adf3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Apr 16 23:42:56 2010 Masaki Suketa + + * test/win32ole/test_folderitem2_invokeverb.rb (test_invokeverb): + run test only when "Create Shortcut (&S)" menu is found. + [ruby-core:29550] [Bug #1602] + Fri Apr 16 21:52:16 2010 Yusuke Endoh * parse.y (string_content, etc): counts of CMDARG_PUSH and POP were diff --git a/test/win32ole/test_folderitem2_invokeverb.rb b/test/win32ole/test_folderitem2_invokeverb.rb index 5a5d475059..e5380cacf7 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