Read input from stdin in test using std::getline().