a few more minor tests
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user