@@ -3,6 +3,7 @@ package cli
33import "testing"
44
55func TestGlyph_Good (t * testing.T ) {
6+ restoreThemeAndColors (t )
67 UseUnicode ()
78 if Glyph (":check:" ) != "✓" {
89 t .Errorf ("Expected ✓, got %s" , Glyph (":check:" ))
@@ -15,6 +16,7 @@ func TestGlyph_Good(t *testing.T) {
1516}
1617
1718func TestGlyph_Bad (t * testing.T ) {
19+ restoreThemeAndColors (t )
1820 // Unknown shortcode returns the shortcode unchanged.
1921 UseUnicode ()
2022 got := Glyph (":unknown:" )
@@ -24,6 +26,7 @@ func TestGlyph_Bad(t *testing.T) {
2426}
2527
2628func TestGlyph_Ugly (t * testing.T ) {
29+ restoreThemeAndColors (t )
2730 // Empty shortcode should not panic.
2831 got := Glyph ("" )
2932 if got != "" {
@@ -32,6 +35,7 @@ func TestGlyph_Ugly(t *testing.T) {
3235}
3336
3437func TestCompileGlyphs_Good (t * testing.T ) {
38+ restoreThemeAndColors (t )
3539 UseUnicode ()
3640 got := compileGlyphs ("Status: :check:" )
3741 if got != "Status: ✓" {
@@ -40,6 +44,7 @@ func TestCompileGlyphs_Good(t *testing.T) {
4044}
4145
4246func TestCompileGlyphs_Bad (t * testing.T ) {
47+ restoreThemeAndColors (t )
4348 UseUnicode ()
4449 // Text with no shortcodes should be returned as-is.
4550 got := compileGlyphs ("no glyphs here" )
@@ -49,6 +54,7 @@ func TestCompileGlyphs_Bad(t *testing.T) {
4954}
5055
5156func TestCompileGlyphs_Ugly (t * testing.T ) {
57+ restoreThemeAndColors (t )
5258 // Empty string should not panic.
5359 got := compileGlyphs ("" )
5460 if got != "" {
0 commit comments