I've written a few tests for delete_selection, but the way different operations initialize the selection seems fairly standard and not worth testing so far.
Tests still have a lot of side-effects on the real screen. We'll gradually clean those up.