Add support for multi-line golden test output. Also fixed some parsing bugs.

[Delivers #58864002]