text-highlight 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,367 @@
1
+ #!/usr/bin/ruby -w
2
+ # -*- ruby -*-
3
+
4
+ require 'testcase'
5
+ require 'text/highlight'
6
+
7
+
8
+ class HTMLHighlightTest < My::TestCase
9
+
10
+ def test_html
11
+ debug ""
12
+ hl = Text::HTMLHighlighter.new
13
+ String.highlighter = hl
14
+
15
+ # foregrounds
16
+
17
+ # none
18
+
19
+ ios = IOString.new
20
+ ios.puts hl.none + "testing" + hl.reset
21
+ assert_equal("testing", ios)
22
+
23
+ ios = IOString.new
24
+ ios.puts hl.none { "testing" }
25
+ assert_equal("testing", ios)
26
+
27
+ ios = IOString.new
28
+ ios.puts "testing".none
29
+ assert_equal("testing", ios)
30
+
31
+ # reset
32
+
33
+ ios = IOString.new
34
+ ios.puts hl.reset + "testing" + hl.reset
35
+ assert_equal("testing", ios)
36
+
37
+ ios = IOString.new
38
+ ios.puts hl.reset { "testing" }
39
+ assert_equal("testing", ios)
40
+
41
+ ios = IOString.new
42
+ ios.puts "testing".reset
43
+ assert_equal("testing", ios)
44
+
45
+ # bold
46
+
47
+ ios = IOString.new
48
+ ios.puts hl.bold + "testing" + hl.reset
49
+ assert_equal("<b>testing</b>", ios)
50
+
51
+ ios = IOString.new
52
+ ios.puts hl.bold { "testing" }
53
+ assert_equal("<b>testing</b>", ios)
54
+
55
+ ios = IOString.new
56
+ ios.puts "testing".bold
57
+ assert_equal("<b>testing</b>", ios)
58
+
59
+ # underscore
60
+
61
+ ios = IOString.new
62
+ ios.puts hl.underscore + "testing" + hl.reset
63
+ assert_equal("<u>testing</u>", ios)
64
+
65
+ ios = IOString.new
66
+ ios.puts hl.underscore { "testing" }
67
+ assert_equal("<u>testing</u>", ios)
68
+
69
+ ios = IOString.new
70
+ ios.puts "testing".underscore
71
+ assert_equal("<u>testing</u>", ios)
72
+
73
+ # underline
74
+
75
+ ios = IOString.new
76
+ ios.puts hl.underline + "testing" + hl.reset
77
+ assert_equal("<u>testing</u>", ios)
78
+
79
+ ios = IOString.new
80
+ ios.puts hl.underline { "testing" }
81
+ assert_equal("<u>testing</u>", ios)
82
+
83
+ ios = IOString.new
84
+ ios.puts "testing".underline
85
+ assert_equal("<u>testing</u>", ios)
86
+
87
+ # blink
88
+
89
+ ios = IOString.new
90
+ ios.puts hl.blink + "testing" + hl.reset
91
+ assert_equal("<blink>testing</blink>", ios)
92
+
93
+ ios = IOString.new
94
+ ios.puts hl.blink { "testing" }
95
+ assert_equal("<blink>testing</blink>", ios)
96
+
97
+ ios = IOString.new
98
+ ios.puts "testing".blink
99
+ assert_equal("<blink>testing</blink>", ios)
100
+
101
+ # reverse
102
+
103
+ ios = IOString.new
104
+ ios.puts hl.reverse + "testing" + hl.reset
105
+ assert_equal("<span style=\"color: white; background-color: black\">testing</span>", ios)
106
+
107
+ ios = IOString.new
108
+ ios.puts hl.reverse { "testing" }
109
+ assert_equal("<span style=\"color: white; background-color: black\">testing</span>", ios)
110
+
111
+ ios = IOString.new
112
+ ios.puts "testing".reverse
113
+ assert_equal("gnitset", ios)
114
+
115
+ ios = IOString.new
116
+ ios.puts "testing".negative
117
+ assert_equal("<span style=\"color: white; background-color: black\">testing</span>", ios)
118
+
119
+ # concealed
120
+
121
+ ios = IOString.new
122
+ ios.puts hl.concealed + "testing" + hl.reset
123
+ assert_equal("<!-- testing -->", ios)
124
+
125
+ ios = IOString.new
126
+ ios.puts hl.concealed { "testing" }
127
+ assert_equal("<!-- testing -->", ios)
128
+
129
+ ios = IOString.new
130
+ ios.puts "testing".concealed
131
+ assert_equal("<!-- testing -->", ios)
132
+
133
+ # black
134
+
135
+ ios = IOString.new
136
+ ios.puts hl.black + "testing" + hl.reset
137
+ assert_equal("<span style=\"color: black\">testing</span>", ios)
138
+
139
+ ios = IOString.new
140
+ ios.puts hl.black { "testing" }
141
+ assert_equal("<span style=\"color: black\">testing</span>", ios)
142
+
143
+ ios = IOString.new
144
+ ios.puts "testing".black
145
+ assert_equal("<span style=\"color: black\">testing</span>", ios)
146
+
147
+ # red
148
+
149
+ ios = IOString.new
150
+ ios.puts hl.red + "testing" + hl.reset
151
+ assert_equal("<span style=\"color: red\">testing</span>", ios)
152
+
153
+ ios = IOString.new
154
+ ios.puts hl.red { "testing" }
155
+ assert_equal("<span style=\"color: red\">testing</span>", ios)
156
+
157
+ ios = IOString.new
158
+ ios.puts "testing".red
159
+ assert_equal("<span style=\"color: red\">testing</span>", ios)
160
+
161
+ # green
162
+
163
+ ios = IOString.new
164
+ ios.puts hl.green + "testing" + hl.reset
165
+ assert_equal("<span style=\"color: green\">testing</span>", ios)
166
+
167
+ ios = IOString.new
168
+ ios.puts hl.green { "testing" }
169
+ assert_equal("<span style=\"color: green\">testing</span>", ios)
170
+
171
+ ios = IOString.new
172
+ ios.puts "testing".green
173
+ assert_equal("<span style=\"color: green\">testing</span>", ios)
174
+
175
+ # yellow
176
+
177
+ ios = IOString.new
178
+ ios.puts hl.yellow + "testing" + hl.reset
179
+ assert_equal("<span style=\"color: yellow\">testing</span>", ios)
180
+
181
+ ios = IOString.new
182
+ ios.puts hl.yellow { "testing" }
183
+ assert_equal("<span style=\"color: yellow\">testing</span>", ios)
184
+
185
+ ios = IOString.new
186
+ ios.puts "testing".yellow
187
+ assert_equal("<span style=\"color: yellow\">testing</span>", ios)
188
+
189
+ # blue
190
+
191
+ ios = IOString.new
192
+ ios.puts hl.blue + "testing" + hl.reset
193
+ assert_equal("<span style=\"color: blue\">testing</span>", ios)
194
+
195
+ ios = IOString.new
196
+ ios.puts hl.blue { "testing" }
197
+ assert_equal("<span style=\"color: blue\">testing</span>", ios)
198
+
199
+ ios = IOString.new
200
+ ios.puts "testing".blue
201
+ assert_equal("<span style=\"color: blue\">testing</span>", ios)
202
+
203
+ # magenta
204
+
205
+ ios = IOString.new
206
+ ios.puts hl.magenta + "testing" + hl.reset
207
+ assert_equal("<span style=\"color: magenta\">testing</span>", ios)
208
+
209
+ ios = IOString.new
210
+ ios.puts hl.magenta { "testing" }
211
+ assert_equal("<span style=\"color: magenta\">testing</span>", ios)
212
+
213
+ ios = IOString.new
214
+ ios.puts "testing".magenta
215
+ assert_equal("<span style=\"color: magenta\">testing</span>", ios)
216
+
217
+ # cyan
218
+
219
+ ios = IOString.new
220
+ ios.puts hl.cyan + "testing" + hl.reset
221
+ assert_equal("<span style=\"color: cyan\">testing</span>", ios)
222
+
223
+ ios = IOString.new
224
+ ios.puts hl.cyan { "testing" }
225
+ assert_equal("<span style=\"color: cyan\">testing</span>", ios)
226
+
227
+ ios = IOString.new
228
+ ios.puts "testing".cyan
229
+ assert_equal("<span style=\"color: cyan\">testing</span>", ios)
230
+
231
+ # white
232
+
233
+ ios = IOString.new
234
+ ios.puts hl.white + "testing" + hl.reset
235
+ assert_equal("<span style=\"color: white\">testing</span>", ios)
236
+
237
+ ios = IOString.new
238
+ ios.puts hl.white { "testing" }
239
+ assert_equal("<span style=\"color: white\">testing</span>", ios)
240
+
241
+ ios = IOString.new
242
+ ios.puts "testing".white
243
+ assert_equal("<span style=\"color: white\">testing</span>", ios)
244
+
245
+ # backgrounds
246
+
247
+ # on_black
248
+
249
+ ios = IOString.new
250
+ ios.puts hl.on_black + "testing" + hl.reset
251
+ assert_equals("<span style=\"background-color: black\">testing</span>", ios)
252
+
253
+ ios = IOString.new
254
+ ios.puts hl.on_black { "testing" }
255
+ assert_equals("<span style=\"background-color: black\">testing</span>", ios)
256
+
257
+ ios = IOString.new
258
+ ios.puts "testing".on_black
259
+ assert_equals("<span style=\"background-color: black\">testing</span>", ios)
260
+
261
+ # on_red
262
+
263
+ ios = IOString.new
264
+ ios.puts hl.on_red + "testing" + hl.reset
265
+ assert_equals("<span style=\"background-color: red\">testing</span>", ios)
266
+
267
+ ios = IOString.new
268
+ ios.puts hl.on_red { "testing" }
269
+ assert_equals("<span style=\"background-color: red\">testing</span>", ios)
270
+
271
+ ios = IOString.new
272
+ ios.puts "testing".on_red
273
+ assert_equals("<span style=\"background-color: red\">testing</span>", ios)
274
+
275
+ # on_green
276
+
277
+ ios = IOString.new
278
+ ios.puts hl.on_green + "testing" + hl.reset
279
+ assert_equals("<span style=\"background-color: green\">testing</span>", ios)
280
+
281
+ ios = IOString.new
282
+ ios.puts hl.on_green { "testing" }
283
+ assert_equals("<span style=\"background-color: green\">testing</span>", ios)
284
+
285
+ ios = IOString.new
286
+ ios.puts "testing".on_green
287
+ assert_equals("<span style=\"background-color: green\">testing</span>", ios)
288
+
289
+ # on_yellow
290
+
291
+ ios = IOString.new
292
+ ios.puts hl.on_yellow + "testing" + hl.reset
293
+ assert_equals("<span style=\"background-color: yellow\">testing</span>", ios)
294
+
295
+ ios = IOString.new
296
+ ios.puts hl.on_yellow { "testing" }
297
+ assert_equals("<span style=\"background-color: yellow\">testing</span>", ios)
298
+
299
+ ios = IOString.new
300
+ ios.puts "testing".on_yellow
301
+ assert_equals("<span style=\"background-color: yellow\">testing</span>", ios)
302
+
303
+ # on_blue
304
+
305
+ ios = IOString.new
306
+ ios.puts hl.on_blue + "testing" + hl.reset
307
+ assert_equals("<span style=\"background-color: blue\">testing</span>", ios)
308
+
309
+ ios = IOString.new
310
+ ios.puts hl.on_blue { "testing" }
311
+ assert_equals("<span style=\"background-color: blue\">testing</span>", ios)
312
+
313
+ ios = IOString.new
314
+ ios.puts "testing".on_blue
315
+ assert_equals("<span style=\"background-color: blue\">testing</span>", ios)
316
+
317
+ # on_magenta
318
+
319
+ ios = IOString.new
320
+ ios.puts hl.on_magenta + "testing" + hl.reset
321
+ assert_equals("<span style=\"background-color: magenta\">testing</span>", ios)
322
+
323
+ ios = IOString.new
324
+ ios.puts hl.on_magenta { "testing" }
325
+ assert_equals("<span style=\"background-color: magenta\">testing</span>", ios)
326
+
327
+ ios = IOString.new
328
+ ios.puts "testing".on_magenta
329
+ assert_equals("<span style=\"background-color: magenta\">testing</span>", ios)
330
+
331
+ # on_cyan
332
+
333
+ ios = IOString.new
334
+ ios.puts hl.on_cyan + "testing" + hl.reset
335
+ assert_equals("<span style=\"background-color: cyan\">testing</span>", ios)
336
+
337
+ ios = IOString.new
338
+ ios.puts hl.on_cyan { "testing" }
339
+ assert_equals("<span style=\"background-color: cyan\">testing</span>", ios)
340
+
341
+ ios = IOString.new
342
+ ios.puts "testing".on_cyan
343
+ assert_equals("<span style=\"background-color: cyan\">testing</span>", ios)
344
+
345
+ # on_white
346
+
347
+ ios = IOString.new
348
+ ios.puts hl.on_white + "testing" + hl.reset
349
+ assert_equals("<span style=\"background-color: white\">testing</span>", ios)
350
+
351
+ ios = IOString.new
352
+ ios.puts hl.on_white { "testing" }
353
+ assert_equals("<span style=\"background-color: white\">testing</span>", ios)
354
+
355
+ ios = IOString.new
356
+ ios.puts "testing".on_white
357
+ assert_equals("<span style=\"background-color: white\">testing</span>", ios)
358
+
359
+ # combos
360
+
361
+ debug "testing HTML red on_blue"
362
+ ios = IOString.new
363
+ ios.puts hl.red + hl.on_blue + "this is red on blue" + hl.reset
364
+ assert_equal("<span style=\"color: red\"><span style=\"background-color: blue\">this is red on blue</span></span>", ios)
365
+ end
366
+
367
+ end
@@ -0,0 +1,367 @@
1
+ #!/usr/bin/ruby -w
2
+ # -*- ruby -*-
3
+
4
+ require 'testcase'
5
+ require 'text/highlight'
6
+
7
+
8
+ class NonHighlightTest < My::TestCase
9
+
10
+ def test_non
11
+ debug ""
12
+ hl = Text::NonHighlighter.new
13
+ String.highlighter = hl
14
+
15
+ # foregrounds
16
+
17
+ # none
18
+
19
+ ios = IOString.new
20
+ ios.puts hl.none + "testing" + hl.reset
21
+ assert_equal("testing", ios)
22
+
23
+ ios = IOString.new
24
+ ios.puts hl.none { "testing" }
25
+ assert_equal("testing", ios)
26
+
27
+ ios = IOString.new
28
+ ios.puts "testing".none
29
+ assert_equal("testing", ios)
30
+
31
+ # reset
32
+
33
+ ios = IOString.new
34
+ ios.puts hl.reset + "testing" + hl.reset
35
+ assert_equal("testing", ios)
36
+
37
+ ios = IOString.new
38
+ ios.puts hl.reset { "testing" }
39
+ assert_equal("testing", ios)
40
+
41
+ ios = IOString.new
42
+ ios.puts "testing".reset
43
+ assert_equal("testing", ios)
44
+
45
+ # bold
46
+
47
+ ios = IOString.new
48
+ ios.puts hl.bold + "testing" + hl.reset
49
+ assert_equal("testing", ios)
50
+
51
+ ios = IOString.new
52
+ ios.puts hl.bold { "testing" }
53
+ assert_equal("testing", ios)
54
+
55
+ ios = IOString.new
56
+ ios.puts "testing".bold
57
+ assert_equal("testing", ios)
58
+
59
+ # underscore
60
+
61
+ ios = IOString.new
62
+ ios.puts hl.underscore + "testing" + hl.reset
63
+ assert_equal("testing", ios)
64
+
65
+ ios = IOString.new
66
+ ios.puts hl.underscore { "testing" }
67
+ assert_equal("testing", ios)
68
+
69
+ ios = IOString.new
70
+ ios.puts "testing".underscore
71
+ assert_equal("testing", ios)
72
+
73
+ # underline
74
+
75
+ ios = IOString.new
76
+ ios.puts hl.underline + "testing" + hl.reset
77
+ assert_equal("testing", ios)
78
+
79
+ ios = IOString.new
80
+ ios.puts hl.underline { "testing" }
81
+ assert_equal("testing", ios)
82
+
83
+ ios = IOString.new
84
+ ios.puts "testing".underline
85
+ assert_equal("testing", ios)
86
+
87
+ # blink
88
+
89
+ ios = IOString.new
90
+ ios.puts hl.blink + "testing" + hl.reset
91
+ assert_equal("testing", ios)
92
+
93
+ ios = IOString.new
94
+ ios.puts hl.blink { "testing" }
95
+ assert_equal("testing", ios)
96
+
97
+ ios = IOString.new
98
+ ios.puts "testing".blink
99
+ assert_equal("testing", ios)
100
+
101
+ # reverse
102
+
103
+ ios = IOString.new
104
+ ios.puts hl.reverse + "testing" + hl.reset
105
+ assert_equal("testing", ios)
106
+
107
+ ios = IOString.new
108
+ ios.puts hl.reverse { "testing" }
109
+ assert_equal("testing", ios)
110
+
111
+ ios = IOString.new
112
+ ios.puts "testing".reverse
113
+ assert_equal("gnitset", ios)
114
+
115
+ ios = IOString.new
116
+ ios.puts "testing".negative
117
+ assert_equal("testing", ios)
118
+
119
+ # concealed
120
+
121
+ ios = IOString.new
122
+ ios.puts hl.concealed + "testing" + hl.reset
123
+ assert_equal("testing", ios)
124
+
125
+ ios = IOString.new
126
+ ios.puts hl.concealed { "testing" }
127
+ assert_equal("testing", ios)
128
+
129
+ ios = IOString.new
130
+ ios.puts "testing".concealed
131
+ assert_equal("testing", ios)
132
+
133
+ # black
134
+
135
+ ios = IOString.new
136
+ ios.puts hl.black + "testing" + hl.reset
137
+ assert_equal("testing", ios)
138
+
139
+ ios = IOString.new
140
+ ios.puts hl.black { "testing" }
141
+ assert_equal("testing", ios)
142
+
143
+ ios = IOString.new
144
+ ios.puts "testing".black
145
+ assert_equal("testing", ios)
146
+
147
+ # red
148
+
149
+ ios = IOString.new
150
+ ios.puts hl.red + "testing" + hl.reset
151
+ assert_equal("testing", ios)
152
+
153
+ ios = IOString.new
154
+ ios.puts hl.red { "testing" }
155
+ assert_equal("testing", ios)
156
+
157
+ ios = IOString.new
158
+ ios.puts "testing".red
159
+ assert_equal("testing", ios)
160
+
161
+ # green
162
+
163
+ ios = IOString.new
164
+ ios.puts hl.green + "testing" + hl.reset
165
+ assert_equal("testing", ios)
166
+
167
+ ios = IOString.new
168
+ ios.puts hl.green { "testing" }
169
+ assert_equal("testing", ios)
170
+
171
+ ios = IOString.new
172
+ ios.puts "testing".green
173
+ assert_equal("testing", ios)
174
+
175
+ # yellow
176
+
177
+ ios = IOString.new
178
+ ios.puts hl.yellow + "testing" + hl.reset
179
+ assert_equal("testing", ios)
180
+
181
+ ios = IOString.new
182
+ ios.puts hl.yellow { "testing" }
183
+ assert_equal("testing", ios)
184
+
185
+ ios = IOString.new
186
+ ios.puts "testing".yellow
187
+ assert_equal("testing", ios)
188
+
189
+ # blue
190
+
191
+ ios = IOString.new
192
+ ios.puts hl.blue + "testing" + hl.reset
193
+ assert_equal("testing", ios)
194
+
195
+ ios = IOString.new
196
+ ios.puts hl.blue { "testing" }
197
+ assert_equal("testing", ios)
198
+
199
+ ios = IOString.new
200
+ ios.puts "testing".blue
201
+ assert_equal("testing", ios)
202
+
203
+ # magenta
204
+
205
+ ios = IOString.new
206
+ ios.puts hl.magenta + "testing" + hl.reset
207
+ assert_equal("testing", ios)
208
+
209
+ ios = IOString.new
210
+ ios.puts hl.magenta { "testing" }
211
+ assert_equal("testing", ios)
212
+
213
+ ios = IOString.new
214
+ ios.puts "testing".magenta
215
+ assert_equal("testing", ios)
216
+
217
+ # cyan
218
+
219
+ ios = IOString.new
220
+ ios.puts hl.cyan + "testing" + hl.reset
221
+ assert_equal("testing", ios)
222
+
223
+ ios = IOString.new
224
+ ios.puts hl.cyan { "testing" }
225
+ assert_equal("testing", ios)
226
+
227
+ ios = IOString.new
228
+ ios.puts "testing".cyan
229
+ assert_equal("testing", ios)
230
+
231
+ # white
232
+
233
+ ios = IOString.new
234
+ ios.puts hl.white + "testing" + hl.reset
235
+ assert_equal("testing", ios)
236
+
237
+ ios = IOString.new
238
+ ios.puts hl.white { "testing" }
239
+ assert_equal("testing", ios)
240
+
241
+ ios = IOString.new
242
+ ios.puts "testing".white
243
+ assert_equal("testing", ios)
244
+
245
+ # backgrounds
246
+
247
+ # on_black
248
+
249
+ ios = IOString.new
250
+ ios.puts hl.on_black + "testing" + hl.reset
251
+ assert_equals("testing", ios)
252
+
253
+ ios = IOString.new
254
+ ios.puts hl.on_black { "testing" }
255
+ assert_equals("testing", ios)
256
+
257
+ ios = IOString.new
258
+ ios.puts "testing".on_black
259
+ assert_equals("testing", ios)
260
+
261
+ # on_red
262
+
263
+ ios = IOString.new
264
+ ios.puts hl.on_red + "testing" + hl.reset
265
+ assert_equals("testing", ios)
266
+
267
+ ios = IOString.new
268
+ ios.puts hl.on_red { "testing" }
269
+ assert_equals("testing", ios)
270
+
271
+ ios = IOString.new
272
+ ios.puts "testing".on_red
273
+ assert_equals("testing", ios)
274
+
275
+ # on_green
276
+
277
+ ios = IOString.new
278
+ ios.puts hl.on_green + "testing" + hl.reset
279
+ assert_equals("testing", ios)
280
+
281
+ ios = IOString.new
282
+ ios.puts hl.on_green { "testing" }
283
+ assert_equals("testing", ios)
284
+
285
+ ios = IOString.new
286
+ ios.puts "testing".on_green
287
+ assert_equals("testing", ios)
288
+
289
+ # on_yellow
290
+
291
+ ios = IOString.new
292
+ ios.puts hl.on_yellow + "testing" + hl.reset
293
+ assert_equals("testing", ios)
294
+
295
+ ios = IOString.new
296
+ ios.puts hl.on_yellow { "testing" }
297
+ assert_equals("testing", ios)
298
+
299
+ ios = IOString.new
300
+ ios.puts "testing".on_yellow
301
+ assert_equals("testing", ios)
302
+
303
+ # on_blue
304
+
305
+ ios = IOString.new
306
+ ios.puts hl.on_blue + "testing" + hl.reset
307
+ assert_equals("testing", ios)
308
+
309
+ ios = IOString.new
310
+ ios.puts hl.on_blue { "testing" }
311
+ assert_equals("testing", ios)
312
+
313
+ ios = IOString.new
314
+ ios.puts "testing".on_blue
315
+ assert_equals("testing", ios)
316
+
317
+ # on_magenta
318
+
319
+ ios = IOString.new
320
+ ios.puts hl.on_magenta + "testing" + hl.reset
321
+ assert_equals("testing", ios)
322
+
323
+ ios = IOString.new
324
+ ios.puts hl.on_magenta { "testing" }
325
+ assert_equals("testing", ios)
326
+
327
+ ios = IOString.new
328
+ ios.puts "testing".on_magenta
329
+ assert_equals("testing", ios)
330
+
331
+ # on_cyan
332
+
333
+ ios = IOString.new
334
+ ios.puts hl.on_cyan + "testing" + hl.reset
335
+ assert_equals("testing", ios)
336
+
337
+ ios = IOString.new
338
+ ios.puts hl.on_cyan { "testing" }
339
+ assert_equals("testing", ios)
340
+
341
+ ios = IOString.new
342
+ ios.puts "testing".on_cyan
343
+ assert_equals("testing", ios)
344
+
345
+ # on_white
346
+
347
+ ios = IOString.new
348
+ ios.puts hl.on_white + "testing" + hl.reset
349
+ assert_equals("testing", ios)
350
+
351
+ ios = IOString.new
352
+ ios.puts hl.on_white { "testing" }
353
+ assert_equals("testing", ios)
354
+
355
+ ios = IOString.new
356
+ ios.puts "testing".on_white
357
+ assert_equals("testing", ios)
358
+
359
+ # combos
360
+
361
+ debug "testing HTML red on_blue"
362
+ ios = IOString.new
363
+ ios.puts hl.red + hl.on_blue + "this is red on blue" + hl.reset
364
+ assert_equal("this is red on blue", ios)
365
+ end
366
+
367
+ end