Open chrstphrchvz opened 2 years ago
Not yet finding any good approaches for this. An AppleScript approach like:
system(<<"EOS") if ($top->windowingsystem eq 'aqua');
osascript -e '
delay 1
tell application "System Events"
set proc to the first process whose unix id is $$
set the frontmost of proc to true
key code 53
end tell
' &
EOS
is undesirable, because user permission is required for AppleScript and System Events access on recent macOS (and I am not aware of an exception to this where a parent process could explicitly allow itself to be controlled by a specific child process).
messageBox.t and various other tests with just ok(1)
are currently only “smoke tests” to check for fatal errors, not whether everything actually works as expected. Terminating the process somehow could be good enough.
Tk Aqua issue 3ceb6b0f65 means that the approach of using a timer event to automatically end the test no longer works on Aqua at least since 8.6.12 (likely since 8.6.11).
Consider finding some other way to programmatically dismiss the message box (and also avoid relying on
exit()
due to #14).