(t *testing.T)
| 21 | } |
| 22 | |
| 23 | func TestSplit(t *testing.T) { |
| 24 | la.insert(Loc{17, 1}, []byte{'\n'}) |
| 25 | assert.Equal(t, len(la.lines), 6) |
| 26 | sub1 := la.Substr(Loc{0, 1}, Loc{17, 1}) |
| 27 | sub2 := la.Substr(Loc{0, 2}, Loc{30, 2}) |
| 28 | |
| 29 | assert.Equal(t, []byte("He wes Leovenaðes"), sub1) |
| 30 | assert.Equal(t, []byte(" sone -- liðe him be Drihten."), sub2) |
| 31 | } |
| 32 | |
| 33 | func TestJoin(t *testing.T) { |
| 34 | la.remove(Loc{47, 1}, Loc{0, 2}) |