summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gudmundsson <dgud@erlang.org>2023-03-22 09:42:19 +0100
committerDan Gudmundsson <dgud@erlang.org>2023-04-24 09:47:04 +0200
commitcec0a672c1f4fb702af5dfa093875b16e4d65b71 (patch)
tree79ef542dd7241dac270d41a54c54113823532d81
parent2392d55e235fa5768bd2db427cfb212ab8f38be6 (diff)
downloaderlang-cec0a672c1f4fb702af5dfa093875b16e4d65b71.tar.gz
Fix tests
Clipboard test hangs on windows, when we run the tests from remote without gui open.
-rw-r--r--lib/wx/test/wx_class_SUITE.erl11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/wx/test/wx_class_SUITE.erl b/lib/wx/test/wx_class_SUITE.erl
index 7cab2d85fa..267ad4d336 100644
--- a/lib/wx/test/wx_class_SUITE.erl
+++ b/lib/wx/test/wx_class_SUITE.erl
@@ -244,6 +244,8 @@ clipboard(Config) ->
wxTextCtrl:connect(Ctrl, command_text_paste, [{skip, true}]),
wxWindow:show(Frame),
+ BlockWxDialogs = wxLogNull:new(),
+
CB = ?mt(wxClipboard, wxClipboard:get()),
wxClipboard:usePrimarySelection(CB),
?m(false, wx:is_null(CB)),
@@ -271,7 +273,10 @@ clipboard(Config) ->
Paste = ?mt(wxTextDataObject, wxTextDataObject:new([{text,"From Erlang"}])),
case wxClipboard:addData(CB,Paste) of
true ->
- ?log("Put text on clipboard~n", []);
+ ?log("Put text on clipboard~n", []),
+ ?log("Flushing ~n",[]),
+ wxClipboard:flush(CB),
+ ?log("Stopping ~n",[]);
false ->
?log("Couldn't copy data to clipboard~n",[])
end,
@@ -279,9 +284,7 @@ clipboard(Config) ->
false ->
?log("Clipboard open failed~n",[])
end,
- ?log("Flushing ~n",[]),
- wxClipboard:flush(CB),
- ?log("Stopping ~n",[]),
+ wxLogNull:destroy(BlockWxDialogs),
wx_test_lib:wx_destroy(Frame,Config).