test/api: add test for set_cursor always updating the screen