windows: clean code to only run test about ReadPassword