@@ -33,6 +33,8 @@ def test_colorize
33
33
assert_equal_with_term ( result , text , seq : seq )
34
34
35
35
assert_equal_with_term ( text , text , seq : seq , tty : false )
36
+ assert_equal_with_term ( text , text , seq : seq , colorable : false )
37
+ assert_equal_with_term ( result , text , seq : seq , tty : false , colorable : true )
36
38
end
37
39
end
38
40
@@ -129,6 +131,14 @@ def test_colorize_code
129
131
130
132
assert_equal_with_term ( code , code , complete : true , tty : false )
131
133
assert_equal_with_term ( code , code , complete : false , tty : false )
134
+
135
+ assert_equal_with_term ( code , code , complete : true , colorable : false )
136
+
137
+ assert_equal_with_term ( code , code , complete : false , colorable : false )
138
+
139
+ assert_equal_with_term ( result , code , complete : true , tty : false , colorable : true )
140
+
141
+ assert_equal_with_term ( result , code , complete : false , tty : false , colorable : true )
132
142
else
133
143
assert_equal_with_term ( code , code )
134
144
end
@@ -148,6 +158,10 @@ def test_colorize_code_complete_true
148
158
assert_equal_with_term ( result , code , complete : true )
149
159
150
160
assert_equal_with_term ( code , code , complete : true , tty : false )
161
+
162
+ assert_equal_with_term ( code , code , complete : true , colorable : false )
163
+
164
+ assert_equal_with_term ( result , code , complete : true , tty : false , colorable : true )
151
165
end
152
166
end
153
167
@@ -162,10 +176,18 @@ def test_colorize_code_complete_false
162
176
163
177
assert_equal_with_term ( code , code , complete : false , tty : false )
164
178
179
+ assert_equal_with_term ( code , code , complete : false , colorable : false )
180
+
181
+ assert_equal_with_term ( result , code , complete : false , tty : false , colorable : true )
182
+
165
183
unless complete_option_supported?
166
184
assert_equal_with_term ( result , code , complete : true )
167
185
168
186
assert_equal_with_term ( code , code , complete : true , tty : false )
187
+
188
+ assert_equal_with_term ( code , code , complete : true , colorable : false )
189
+
190
+ assert_equal_with_term ( result , code , complete : true , tty : false , colorable : true )
169
191
end
170
192
else
171
193
assert_equal_with_term ( code , code )
0 commit comments