(t *testing.T)
| 31 | } |
| 32 | |
| 33 | func TestJoin(t *testing.T) { |
| 34 | la.remove(Loc{47, 1}, Loc{0, 2}) |
| 35 | assert.Equal(t, len(la.lines), 5) |
| 36 | sub := la.Substr(Loc{0, 1}, Loc{47, 1}) |
| 37 | bytes := la.Bytes() |
| 38 | |
| 39 | assert.Equal(t, []byte("He wes Leovenaðes sone -- liðe him be Drihten."), sub) |
| 40 | assert.Equal(t, unicode_txt, string(bytes)) |
| 41 | } |
| 42 | |
| 43 | func TestInsert(t *testing.T) { |
| 44 | la.insert(Loc{20, 3}, []byte(" foobar")) |