We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73e3e22 commit 4c2cd34Copy full SHA for 4c2cd34
1 file changed
color_test.go
@@ -104,6 +104,20 @@ func TestColorEquals(t *testing.T) {
104
}
105
106
107
+func TestColorEquals_DuplicateAttributes(t *testing.T) {
108
+ ordered := New(FgRed, Bold).Add(FgRed)
109
+ reordered := New(Bold, FgRed).Add(FgRed)
110
+ differentCounts := New(FgRed, Bold).Add(Bold)
111
+
112
+ if !ordered.Equals(reordered) {
113
+ t.Error("Colors with the same attributes in different orders are not equal")
114
+ }
115
116
+ if ordered.Equals(differentCounts) {
117
+ t.Error("Colors with different duplicate attribute counts are equal")
118
119
+}
120
121
func TestNoColor(t *testing.T) {
122
rb := new(bytes.Buffer)
123
Output = rb
0 commit comments