package game import ( "strings" "testing" "thehouseoficarus/internal/casino" "thehouseoficarus/internal/color" ) func TestRenderSlotSnapshotColorsWordSymbols(t *testing.T) { snapshot := &casino.SlotSnapshot{StoppedReels: 1} snapshot.Grid[0][0] = "scatter" if !strings.Contains(renderSlotSnapshot(snapshot, "none", false), "scatter") { t.Fatal("expected word-based slot symbols") } output := renderSlotSnapshot(snapshot, "xterm256", true) if !strings.Contains(output, "\033[38;5;") { t.Fatalf("expected colored slot symbols, got %q", output) } for _, line := range strings.Split(output, "\n") { if color.VisibleLen(line) != 51 { t.Fatalf("line visible width = %d, want 51: %q", color.VisibleLen(line), line) } } if !strings.Contains(output, "┌") || !strings.Contains(output, "└") { t.Fatalf("slot output lacks the Unicode frame: %q", output) } }