diff --git a/internal/cops/display/render_test.go b/internal/cops/display/render_test.go index 7373613..3731c71 100644 --- a/internal/cops/display/render_test.go +++ b/internal/cops/display/render_test.go @@ -3,6 +3,7 @@ package display_test import ( "image" "image/color" + "strings" "testing" "github.com/stretchr/testify/assert" @@ -44,3 +45,28 @@ func TestRender_blankAndMultiRuneCellOver(t *testing.T) { buf, cur = RenderOver(buf, cur, front, back, Model0) assert.Equal(t, []byte(" "+whiteHand+"\r\033[2C "), buf) } + +func TestRender_model8(t *testing.T) { + dis := New(image.Rect(0, 0, 16, 8)) + for y := 0; y < 8; y++ { + b := Colors[y] + for x := 0; x < 16; x++ { + f := Colors[x/2] + dis.SetRGBA(x, y, "<", f, b) + x++ + dis.SetRGBA(x, y, ">", f, b) + } + } + // TODO also cur = Start + buf, _ := Render(nil, Reset, dis, Model3) + assert.Equal(t, []string{ + "<><><><><><><><>", + "<><><><><><><><>", + "<><><><><><><><>", + "<><><><><><><><>", + "<><><><><><><><>", + "<><><><><><><><>", + "<><><><><><><><>", + "<><><><><><><><>", + }, strings.Split(string(buf), "\r\n")) +}