diff options
author | Alexey Yerin <yyp@disroot.org> | 2021-07-16 08:46:13 +0300 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-08-06 13:51:03 +0200 |
commit | e9a2fc45ed3d54e342c319098de4472d2a63e7fd (patch) | |
tree | 6dc185d6e54a6dc930707fc80164cfdd15f5b5d9 /ui/editor_test.go | |
parent | Enable scrolling through the vertical member list with the mouse wheel (diff) |
ui: fix editor tests
Diffstat (limited to 'ui/editor_test.go')
-rw-r--r-- | ui/editor_test.go | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ui/editor_test.go b/ui/editor_test.go index ea2b165..d670e0e 100644 --- a/ui/editor_test.go +++ b/ui/editor_test.go @@ -51,7 +51,8 @@ func assertEditorEq(t *testing.T, actual, expected Editor) { } func TestOneLetter(t *testing.T) { - e := NewEditor(5, nil) + e := NewEditor(nil) + e.Resize(5) e.PutRune('h') assertEditorEq(t, e, Editor{ text: [][]rune{[]rune{'h'}}, @@ -63,7 +64,8 @@ func TestOneLetter(t *testing.T) { } func TestFourLetters(t *testing.T) { - e := NewEditor(5, nil) + e := NewEditor(nil) + e.Resize(5) e.PutRune('h') e.PutRune('e') e.PutRune('l') @@ -72,7 +74,8 @@ func TestFourLetters(t *testing.T) { } func TestOneLeft(t *testing.T) { - e := NewEditor(5, nil) + e := NewEditor(nil) + e.Resize(5) e.PutRune('h') e.PutRune('l') e.Left() @@ -83,7 +86,8 @@ func TestOneLeft(t *testing.T) { } func TestOneRem(t *testing.T) { - e := NewEditor(5, nil) + e := NewEditor(nil) + e.Resize(5) e.PutRune('h') e.PutRune('l') e.RemRune() @@ -94,7 +98,8 @@ func TestOneRem(t *testing.T) { } func TestLeftAndRem(t *testing.T) { - e := NewEditor(5, nil) + e := NewEditor(nil) + e.Resize(5) e.PutRune('h') e.PutRune('l') e.PutRune('e') |