Added a test for success and associated test file
Function now ignores newline characters