[fix] replace newlines with spaces, and fix akward test