minimal unit tests
Trim error messages so they don't start with a newline.