@@ -33,6 +33,8 @@ def test_colorize
3333 assert_equal_with_term ( result , text , seq : seq )
3434
3535 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 )
3638 end
3739 end
3840
@@ -129,6 +131,14 @@ def test_colorize_code
129131
130132 assert_equal_with_term ( code , code , complete : true , tty : false )
131133 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 )
132142 else
133143 assert_equal_with_term ( code , code )
134144 end
@@ -148,6 +158,10 @@ def test_colorize_code_complete_true
148158 assert_equal_with_term ( result , code , complete : true )
149159
150160 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 )
151165 end
152166 end
153167
@@ -162,10 +176,18 @@ def test_colorize_code_complete_false
162176
163177 assert_equal_with_term ( code , code , complete : false , tty : false )
164178
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+
165183 unless complete_option_supported?
166184 assert_equal_with_term ( result , code , complete : true )
167185
168186 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 )
169191 end
170192 else
171193 assert_equal_with_term ( code , code )
0 commit comments