Billy Keyes
eb5f3de78c
Improve conflict error detection
...
Conflict errors are now represented by an exported type that is
compatible with errors.Is instead of using the method defined on
ApplyError. This makes the tests slightly cleaner and should be more
idiomatic for clients.
2020-01-12 22:09:08 -08:00
Billy Keyes
1b341e0693
Add error tests for TextFragment#ApplyStrict
...
These cover the errors that can happen with a single fragment and no
additional manipulation by the caller of ApplyStrict.
2020-01-12 22:09:08 -08:00
Billy Keyes
6a055aa600
Add exact line test for TextFragment#ApplyStrict
...
This ensures the line number is used and application isn't based only on
matching context lines.
2020-01-12 22:08:15 -08:00
Billy Keyes
7bd4e0bb0e
Fix EOF handling in TextFragment#ApplyStrict
...
io.EOF was not properly accounted for when dealing with patches that are
missing trailing newline characters.
2020-01-09 22:05:24 -08:00
Billy Keyes
02f7ff4f79
Add positive tests for TextFragment#ApplyStrict
...
These cover all of the cases (I think) where application should succeed.
2020-01-08 23:04:44 -08:00