Update write tests to expect nl at end of output str.