Skip to content

Commit

Permalink
Add test case to run selectAll on empty entry
Browse files Browse the repository at this point in the history
  • Loading branch information
lusingander authored and andydotxyz committed Jul 26, 2020
1 parent d9246cc commit 14bdf79
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions widget/entry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,13 @@ func TestEntry_SelectAll(t *testing.T) {
assert.Equal(t, 9, e.CursorColumn)
}

func TestEntry_SelectAll_EmptyEntry(t *testing.T) {
entry := widget.NewEntry()
entry.TypedShortcut(&fyne.ShortcutSelectAll{})

assert.Equal(t, "", entry.SelectedText())
}

func TestEntry_SelectSnapRight(t *testing.T) {
e, window := setupSelection(false)
defer teardownImageTest(window)
Expand Down

0 comments on commit 14bdf79

Please sign in to comment.