Test 1: Verify that a header at the beginning of inserted content is preserved. Success.

bar

baz
was inserted into
foo^foo
and the result was:foo

bar

bazfoo Success.

bar

baz
was inserted into
foo^foo
and the result was:foo

bar

bazfoo Success.

bar

baz
was inserted into
foo^foo
and the result was:foo

bar

bazfoo Success.

bar

baz
was inserted into
foo^foo
and the result was:foo

bar

bazfoo Success.
bar
baz
was inserted into
foo^foo
and the result was:foo
bar
bazfoo Success.
bar
baz
was inserted into
foo^foo
and the result was:foo
bar
bazfoo Test 2: Verify that a header at the end of inserted content is preserved. Success.
bar

baz

was inserted into
foo^foo
and the result was:foobar

baz

foo Success.
bar

baz

was inserted into
foo^foo
and the result was:foobar

baz

foo Success.
bar

baz

was inserted into
foo^foo
and the result was:foobar

baz

foo Success.
bar

baz

was inserted into
foo^foo
and the result was:foobar

baz

foo Success.
bar
baz
was inserted into
foo^foo
and the result was:foobar
baz
foo Success.
bar
baz
was inserted into
foo^foo
and the result was:foobar
baz
foo