redirect cin for test of cli