gilo/internal/editor/editor_test.go
Timothy J. Warren 787166df3a
All checks were successful
timw4mail/gilo/pipeline/head This commit looks good
Move stuff again, just because
2021-04-02 15:36:43 -04:00

26 lines
432 B
Go

package editor
import "testing"
func TestNew(t *testing.T) {
e := NewEditor()
if e == nil {
t.Errorf("Failed to create editor")
}
}
func TestInsertChar(t *testing.T) {
e := NewEditor()
e.insertChar('q')
if e.document.RowCount() != 1 {
t.Errorf("A row was not created when the character was inserted")
}
row := e.document.Row(0)
if row.Size() != 1 {
t.Errorf("Failed to add character to row. Row: %v", row)
}
}