TestProfile_HasColorAndString locks the profile helpers used by /config.
(t *testing.T)
| 118 | |
| 119 | // TestProfile_HasColorAndString locks the profile helpers used by /config. |
| 120 | func TestProfile_HasColorAndString(t *testing.T) { |
| 121 | assert.True(t, ProfileTrueColor.HasColor()) |
| 122 | assert.True(t, ProfileANSI.HasColor()) |
| 123 | assert.False(t, ProfileASCII.HasColor()) |
| 124 | assert.False(t, ProfileNoTTY.HasColor()) |
| 125 | assert.Equal(t, "truecolor", ProfileTrueColor.String()) |
| 126 | assert.Equal(t, "no-tty", ProfileNoTTY.String()) |
| 127 | } |
| 128 | |
| 129 | // TestGlamourStyleConfig_RendersAndIsThemed ensures the generated style is |
| 130 | // valid (glamour accepts it) and that the active theme actually drives it: |