Add missing test cases newCursorForMoveRightWord()

This commit is contained in:
kyu08 2026-07-12 20:22:35 +09:00
parent 3537f855b0
commit 0a70e3a824

View file

@ -632,6 +632,26 @@ func TestTextArea(t *testing.T) {
expectedCursor: 4,
expectedClipboard: "def",
},
{
actions: func(textarea *TextArea) {
textarea.TypeString(`(abc)def`)
textarea.GoToStartOfLine()
textarea.ForwardDeleteWord()
},
expectedContent: "abc)def",
expectedCursor: 0,
expectedClipboard: "(",
},
{
actions: func(textarea *TextArea) {
textarea.TypeString(`abc)def`)
textarea.GoToStartOfLine()
textarea.ForwardDeleteWord()
},
expectedContent: ")def",
expectedCursor: 0,
expectedClipboard: "abc",
},
{
actions: func(textarea *TextArea) {
textarea.TypeString(`abc`)