cli/pkg/cli/glyph_test.go
Virgil 8b30e80688
All checks were successful
Security Scan / security (push) Successful in 21s
feat(cli): add ASCII glyph fallbacks for tree and tracker
Co-authored-by: Virgil <virgil@lethean.io>
2026-04-02 05:23:01 +00:00

25 lines
496 B
Go

package cli
import "testing"
func TestGlyph(t *testing.T) {
restoreThemeAndColors(t)
UseUnicode()
if Glyph(":check:") != "✓" {
t.Errorf("Expected ✓, got %s", Glyph(":check:"))
}
UseASCII()
if Glyph(":check:") != "[OK]" {
t.Errorf("Expected [OK], got %s", Glyph(":check:"))
}
}
func TestCompileGlyphs(t *testing.T) {
restoreThemeAndColors(t)
UseUnicode()
got := compileGlyphs("Status: :check:")
if got != "Status: ✓" {
t.Errorf("Expected Status: ✓, got %s", got)
}
}