mirror of
https://github.com/walles/moar.git
synced 2024-09-11 12:15:43 +03:00
Cover one more mutation
This commit is contained in:
parent
5313c02dd6
commit
40a5ab1430
@ -99,6 +99,23 @@ func TestRenderLineLastReversed(t *testing.T) {
|
||||
strings.ReplaceAll(reset+reversed+"<"+reset+clearToEol, "", "ESC"))
|
||||
}
|
||||
|
||||
func TestRenderLineLastNonSpace(t *testing.T) {
|
||||
row := []Cell{
|
||||
{
|
||||
Rune: 'X',
|
||||
Style: StyleDefault,
|
||||
},
|
||||
}
|
||||
|
||||
rendered, count := renderLine(row)
|
||||
assert.Equal(t, count, 1)
|
||||
reset := "[m"
|
||||
clearToEol := "[K"
|
||||
assert.Equal(t,
|
||||
strings.ReplaceAll(rendered, "", "ESC"),
|
||||
strings.ReplaceAll(reset+"X"+clearToEol, "", "ESC"))
|
||||
}
|
||||
|
||||
func TestRenderLineLastReversedPlusTrailingSpace(t *testing.T) {
|
||||
row := []Cell{
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user