Skip to content

Commit

Permalink
Add a test which shows the backspace issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mgazza committed Jun 18, 2024
1 parent d01a6d4 commit 0056105
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions output_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,13 @@ func TestTerminal_Backspace(t *testing.T) {

assert.Equal(t, "Hello", term.content.Text())
}

func TestTerminal_Backspace_Foreign_Characters(t *testing.T) {
term := New()
term.Resize(fyne.NewSize(50, 50))
term.handleOutput([]byte("çîß"))
assert.Equal(t, "çîß", term.content.Text())

term.handleOutput([]byte{asciiBackspace})
assert.Equal(t, "çî", term.content.Text())
}

0 comments on commit 0056105

Please sign in to comment.