- 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>
20 lines
385 B
Go
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")
|
|
}
|
|
}
|