TestReadInputLine generalized