Skip to content

Commit 0056105

Browse files
committed
Add a test which shows the backspace issue
1 parent d01a6d4 commit 0056105

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

output_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,13 @@ func TestTerminal_Backspace(t *testing.T) {
1919

2020
assert.Equal(t, "Hello", term.content.Text())
2121
}
22+
23+
func TestTerminal_Backspace_Foreign_Characters(t *testing.T) {
24+
term := New()
25+
term.Resize(fyne.NewSize(50, 50))
26+
term.handleOutput([]byte("çîß"))
27+
assert.Equal(t, "çîß", term.content.Text())
28+
29+
term.handleOutput([]byte{asciiBackspace})
30+
assert.Equal(t, "çî", term.content.Text())
31+
}

0 commit comments

Comments
 (0)