Add tests for handle_backspace