Britons living abroad may have to retake test if UK leaves EU with no deal, government warns.