Add a test for --goto-event.
Merge #773.