go/pkg/cli/ansi_test.go
Snider cdcb489d7b refactor: migrate all pkg/* to cli abstraction
- Replaces lipgloss/fmt with cli.* functions
- Adds unit tests for new cli components
- Fixes all build errors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 23:54:01 +00:00

20 lines
385 B
Go

package cli
import (
"strings"
"testing"
)
func TestAnsiStyle_Render(t *testing.T) {
s := NewStyle().Bold().Foreground("#ff0000")
got := s.Render("test")
if got == "test" {
t.Error("Expected styled output")
}
if !strings.Contains(got, "test") {
t.Error("Output should contain text")
}
if !strings.Contains(got, "[1m") {
t.Error("Output should contain bold code")
}
}