I noticed that during a merge a line from the branch I was merging from was missing between the conflict markers. A bit of analysis gave me the test case generated by a shell script at the end of this ticket.

Note than the line containing <b>'f'</b> in v1 is completely missing in the merge result. Also, the line containing <b>'a'</b> should either appear once outside or twice inside the conflict markers.

<verbatim>

for l in 1 2 3 4 5 6 7 8 9; do echo $l; done > base
for l in 1 2 3 4 5 a b c d e f 6 7 8 9; do echo $l; done > v1
for l in 1 2 3 4 5 a b c x y z 6 7 8 9; do echo $l; done > v2
fossil test-3-way-merge base v1 v2 result
</verbatim>