Actions
Bug #13894
closedwin32ole/test_word.rb sometimes not quit Word
Description
When I run test-all, Word does not quit sometimes and Word opens confirm dialog to save files.
I have to close Word manually.
I think that w.quit(Word::WdDoNotSaveChanges)
may be better to quit word.
diff --git a/test/win32ole/test_word.rb b/test/win32ole/test_word.rb
index 03b0bcbdde..b1cdb273cc 100644
--- a/test/win32ole/test_word.rb
+++ b/test/win32ole/test_word.rb
@@ -8,17 +8,22 @@
end
require "test/unit"
+if defined?(WIN32OLE)
+ module Word; end
+end
+
def word_installed?
installed = false
w = nil
if defined?(WIN32OLE)
begin
w = WIN32OLE.new('Word.Application')
+ WIN32OLE.const_load(w, Word)
installed = true
rescue
ensure
if w
- w.quit
+ w.quit(Word::WdDoNotSaveChanges)
w = nil
end
end
@@ -59,7 +64,7 @@ def test_s_connect
def teardown
if @obj
- @obj.quit
+ @obj.quit(Word::WdDoNotSaveChanges)
@obj = nil
end
end
Updated by suke (Masaki Suketa) over 7 years ago
- Status changed from Assigned to Closed
Applied in changeset trunk|r59867.
test/win32ole/test_word.rb: word quit without confirmation dialog to save
files. [Bug #13894] Thanks to h.shirosaki.
Updated by suke (Masaki Suketa) over 7 years ago
- Backport changed from 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN to 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED
Updated by MSP-Greg (Greg L) over 7 years ago
I don't recall having this issue in my builds, but with the patch, I have quite a few warnings. I could file a separate bug report. Try:
ruby -v -rwin32ole -e "module Word ; end ; w = WIN32OLE.new('Word.Application') ; WIN32OLE.const_load(w, Word) ; w.quit(Word::WdDoNotSaveChanges)"
Updated by usa (Usaku NAKAMURA) over 7 years ago
- Related to Bug #14085: many redefinition warnings on test/win32ole/test_word.rb added
Updated by nagachika (Tomoyuki Chikanaga) about 7 years ago
- Backport changed from 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED to 2.2: REQUIRED, 2.3: REQUIRED, 2.4: DONE
ruby_2_4 r62645 merged revision(s) 59867.
Updated by usa (Usaku NAKAMURA) about 7 years ago
- Backport changed from 2.2: REQUIRED, 2.3: REQUIRED, 2.4: DONE to 2.2: REQUIRED, 2.3: DONE, 2.4: DONE
ruby_2_3 r62812 merged revision(s) 59867.
Actions
Like0
Like0Like0Like0Like0Like0Like0