a few more minor tests

This commit is contained in:
2017-08-09 14:57:52 -07:00
parent e4f2e04736
commit 7515d51f7f
+13
View File
@@ -285,6 +285,7 @@ func TestDelta2(t *testing.T) {
}
}
func TestDelta(t *testing.T) {
type c struct {
name string
@@ -333,8 +334,20 @@ func TestDelta(t *testing.T) {
{"remove part",
"aa", "a", Remove(0, 0, "a")},
{"remove other part",
"aa", "a", Remove(0, 1, "a")},
{"remove across line",
"a\nb", "a", Remove(0, 1, "\nb")},
{"remove across two lines",
"a\nb\nc", "ac", Remove(0, 1, "\nb\n")},
{"remove all across line",
"a\nb", "", Remove(0, 0, "a\nb")},
{"remove all across two lines",
"a\nb\nc", "", Remove(0, 0, "a\nb\nc")},
}
for _, c := range cases {