Restructured to make test output less wordy, added tests for ret, endOfStr