Tests for a bug in the paragraph separator insertion code that would add an extra newline when inserting a paragraph separator at the end of a paragraph in text that preserves newlines. Also, an extraneous space would be added after 'foo'. Only one newline should be added. And there should be no extraneous spaces.

It demonstrates a bug: too much padding is left between the new line and the end of the paragraph containing 'foo'.

foo
bar