riel 1.1.16 → 1.1.17
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -37
- data/lib/riel/log/log.rb +17 -24
- data/lib/riel/log/loggable.rb +13 -15
- data/lib/riel/log/logger.rb +34 -66
- data/lib/riel/log.rb +0 -63
- data/lib/riel/optproc.rb +0 -3
- data/lib/riel/string.rb +0 -2
- data/lib/riel.rb +1 -1
- data/test/riel/log/format_test.rb +48 -0
- data/test/riel/optproc_test.rb +1 -30
- data/test/riel/{log_stack_test.rb → testlog/log_stack_test.rb} +0 -0
- data/test/riel/testlog/log_test.rb +254 -0
- data/test/riel/testlog/loggable_test.rb +31 -0
- metadata +89 -133
- data/lib/riel/ansicolor.rb +0 -91
- data/lib/riel/asciitable/cell.rb +0 -82
- data/lib/riel/asciitable/column.rb +0 -26
- data/lib/riel/asciitable/row.rb +0 -105
- data/lib/riel/asciitable/table.rb +0 -295
- data/lib/riel/text/ansi/ansi_color.rb +0 -31
- data/lib/riel/text/ansi/ansi_colors.rb +0 -16
- data/lib/riel/text/ansi/ansi_highlight.rb +0 -69
- data/lib/riel/text/ansi/ansi_list.rb +0 -17
- data/lib/riel/text/ansi/ansi_palette.rb +0 -48
- data/lib/riel/text/ansi/attributes.rb +0 -21
- data/lib/riel/text/ansi/backgrounds.rb +0 -13
- data/lib/riel/text/ansi/color.rb +0 -62
- data/lib/riel/text/ansi/foregrounds.rb +0 -12
- data/lib/riel/text/ansi/grey.rb +0 -30
- data/lib/riel/text/ansi/grey_palette.rb +0 -36
- data/lib/riel/text/ansi/palette.rb +0 -18
- data/lib/riel/text/ansi/rgb_color.rb +0 -28
- data/lib/riel/text/ansi/rgb_highlighter.rb +0 -73
- data/lib/riel/text/ansi/rgb_palette.rb +0 -49
- data/lib/riel/text/highlight.rb +0 -130
- data/lib/riel/text/highlightable.rb +0 -85
- data/lib/riel/text/html_highlight.rb +0 -98
- data/lib/riel/text/non_highlight.rb +0 -17
- data/lib/riel/text/string.rb +0 -10
- data/lib/riel/text.rb +0 -4
- data/test/riel/asciitable/table_test.rb +0 -77
- data/test/riel/log_test.rb +0 -164
- data/test/riel/text/ansi/ansi_highlight_test.rb +0 -116
- data/test/riel/text/ansi/ansi_palette_test.rb +0 -65
- data/test/riel/text/ansi/grey_palette_test.rb +0 -39
- data/test/riel/text/ansi/rgb_highlighter_test.rb +0 -99
- data/test/riel/text/ansi/rgb_palette_test.rb +0 -122
- data/test/riel/text/highlightable_test.rb +0 -24
- data/test/riel/text/string_test.rb +0 -47
- data/test/riel/text_test.rb +0 -62
@@ -1,122 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby -w
|
2
|
-
# -*- ruby -*-
|
3
|
-
|
4
|
-
require 'riel/text/ansi/rgb_palette'
|
5
|
-
require 'riel/text/ansi/palette_tc'
|
6
|
-
|
7
|
-
module Text
|
8
|
-
class RGBPaletteTest < PaletteTest
|
9
|
-
def cls
|
10
|
-
RGBPalette
|
11
|
-
end
|
12
|
-
|
13
|
-
def test_foregrounds
|
14
|
-
expected = [
|
15
|
-
"rgb foreground colors\n",
|
16
|
-
"[38;5;16m000[0m [38;5;17m001[0m [38;5;18m002[0m [38;5;19m003[0m [38;5;20m004[0m [38;5;21m005[0m \n",
|
17
|
-
"[38;5;22m010[0m [38;5;23m011[0m [38;5;24m012[0m [38;5;25m013[0m [38;5;26m014[0m [38;5;27m015[0m \n",
|
18
|
-
"[38;5;28m020[0m [38;5;29m021[0m [38;5;30m022[0m [38;5;31m023[0m [38;5;32m024[0m [38;5;33m025[0m \n",
|
19
|
-
"[38;5;34m030[0m [38;5;35m031[0m [38;5;36m032[0m [38;5;37m033[0m [38;5;38m034[0m [38;5;39m035[0m \n",
|
20
|
-
"[38;5;40m040[0m [38;5;41m041[0m [38;5;42m042[0m [38;5;43m043[0m [38;5;44m044[0m [38;5;45m045[0m \n",
|
21
|
-
"[38;5;46m050[0m [38;5;47m051[0m [38;5;48m052[0m [38;5;49m053[0m [38;5;50m054[0m [38;5;51m055[0m \n",
|
22
|
-
"\n",
|
23
|
-
"[38;5;52m100[0m [38;5;53m101[0m [38;5;54m102[0m [38;5;55m103[0m [38;5;56m104[0m [38;5;57m105[0m \n",
|
24
|
-
"[38;5;58m110[0m [38;5;59m111[0m [38;5;60m112[0m [38;5;61m113[0m [38;5;62m114[0m [38;5;63m115[0m \n",
|
25
|
-
"[38;5;64m120[0m [38;5;65m121[0m [38;5;66m122[0m [38;5;67m123[0m [38;5;68m124[0m [38;5;69m125[0m \n",
|
26
|
-
"[38;5;70m130[0m [38;5;71m131[0m [38;5;72m132[0m [38;5;73m133[0m [38;5;74m134[0m [38;5;75m135[0m \n",
|
27
|
-
"[38;5;76m140[0m [38;5;77m141[0m [38;5;78m142[0m [38;5;79m143[0m [38;5;80m144[0m [38;5;81m145[0m \n",
|
28
|
-
"[38;5;82m150[0m [38;5;83m151[0m [38;5;84m152[0m [38;5;85m153[0m [38;5;86m154[0m [38;5;87m155[0m \n",
|
29
|
-
"\n",
|
30
|
-
"[38;5;88m200[0m [38;5;89m201[0m [38;5;90m202[0m [38;5;91m203[0m [38;5;92m204[0m [38;5;93m205[0m \n",
|
31
|
-
"[38;5;94m210[0m [38;5;95m211[0m [38;5;96m212[0m [38;5;97m213[0m [38;5;98m214[0m [38;5;99m215[0m \n",
|
32
|
-
"[38;5;100m220[0m [38;5;101m221[0m [38;5;102m222[0m [38;5;103m223[0m [38;5;104m224[0m [38;5;105m225[0m \n",
|
33
|
-
"[38;5;106m230[0m [38;5;107m231[0m [38;5;108m232[0m [38;5;109m233[0m [38;5;110m234[0m [38;5;111m235[0m \n",
|
34
|
-
"[38;5;112m240[0m [38;5;113m241[0m [38;5;114m242[0m [38;5;115m243[0m [38;5;116m244[0m [38;5;117m245[0m \n",
|
35
|
-
"[38;5;118m250[0m [38;5;119m251[0m [38;5;120m252[0m [38;5;121m253[0m [38;5;122m254[0m [38;5;123m255[0m \n",
|
36
|
-
"\n",
|
37
|
-
"[38;5;124m300[0m [38;5;125m301[0m [38;5;126m302[0m [38;5;127m303[0m [38;5;128m304[0m [38;5;129m305[0m \n",
|
38
|
-
"[38;5;130m310[0m [38;5;131m311[0m [38;5;132m312[0m [38;5;133m313[0m [38;5;134m314[0m [38;5;135m315[0m \n",
|
39
|
-
"[38;5;136m320[0m [38;5;137m321[0m [38;5;138m322[0m [38;5;139m323[0m [38;5;140m324[0m [38;5;141m325[0m \n",
|
40
|
-
"[38;5;142m330[0m [38;5;143m331[0m [38;5;144m332[0m [38;5;145m333[0m [38;5;146m334[0m [38;5;147m335[0m \n",
|
41
|
-
"[38;5;148m340[0m [38;5;149m341[0m [38;5;150m342[0m [38;5;151m343[0m [38;5;152m344[0m [38;5;153m345[0m \n",
|
42
|
-
"[38;5;154m350[0m [38;5;155m351[0m [38;5;156m352[0m [38;5;157m353[0m [38;5;158m354[0m [38;5;159m355[0m \n",
|
43
|
-
"\n",
|
44
|
-
"[38;5;160m400[0m [38;5;161m401[0m [38;5;162m402[0m [38;5;163m403[0m [38;5;164m404[0m [38;5;165m405[0m \n",
|
45
|
-
"[38;5;166m410[0m [38;5;167m411[0m [38;5;168m412[0m [38;5;169m413[0m [38;5;170m414[0m [38;5;171m415[0m \n",
|
46
|
-
"[38;5;172m420[0m [38;5;173m421[0m [38;5;174m422[0m [38;5;175m423[0m [38;5;176m424[0m [38;5;177m425[0m \n",
|
47
|
-
"[38;5;178m430[0m [38;5;179m431[0m [38;5;180m432[0m [38;5;181m433[0m [38;5;182m434[0m [38;5;183m435[0m \n",
|
48
|
-
"[38;5;184m440[0m [38;5;185m441[0m [38;5;186m442[0m [38;5;187m443[0m [38;5;188m444[0m [38;5;189m445[0m \n",
|
49
|
-
"[38;5;190m450[0m [38;5;191m451[0m [38;5;192m452[0m [38;5;193m453[0m [38;5;194m454[0m [38;5;195m455[0m \n",
|
50
|
-
"\n",
|
51
|
-
"[38;5;196m500[0m [38;5;197m501[0m [38;5;198m502[0m [38;5;199m503[0m [38;5;200m504[0m [38;5;201m505[0m \n",
|
52
|
-
"[38;5;202m510[0m [38;5;203m511[0m [38;5;204m512[0m [38;5;205m513[0m [38;5;206m514[0m [38;5;207m515[0m \n",
|
53
|
-
"[38;5;208m520[0m [38;5;209m521[0m [38;5;210m522[0m [38;5;211m523[0m [38;5;212m524[0m [38;5;213m525[0m \n",
|
54
|
-
"[38;5;214m530[0m [38;5;215m531[0m [38;5;216m532[0m [38;5;217m533[0m [38;5;218m534[0m [38;5;219m535[0m \n",
|
55
|
-
"[38;5;220m540[0m [38;5;221m541[0m [38;5;222m542[0m [38;5;223m543[0m [38;5;224m544[0m [38;5;225m545[0m \n",
|
56
|
-
"[38;5;226m550[0m [38;5;227m551[0m [38;5;228m552[0m [38;5;229m553[0m [38;5;230m554[0m [38;5;231m555[0m \n",
|
57
|
-
"\n",
|
58
|
-
]
|
59
|
-
|
60
|
-
assert_print expected, :print_foregrounds
|
61
|
-
end
|
62
|
-
|
63
|
-
def test_backgrounds
|
64
|
-
expected = [
|
65
|
-
"rgb background colors\n",
|
66
|
-
"[48;5;16m000[0m [48;5;17m001[0m [48;5;18m002[0m [48;5;19m003[0m [48;5;20m004[0m [48;5;21m005[0m \n",
|
67
|
-
"[48;5;22m010[0m [48;5;23m011[0m [48;5;24m012[0m [48;5;25m013[0m [48;5;26m014[0m [48;5;27m015[0m \n",
|
68
|
-
"[48;5;28m020[0m [48;5;29m021[0m [48;5;30m022[0m [48;5;31m023[0m [48;5;32m024[0m [48;5;33m025[0m \n",
|
69
|
-
"[48;5;34m030[0m [48;5;35m031[0m [48;5;36m032[0m [48;5;37m033[0m [48;5;38m034[0m [48;5;39m035[0m \n",
|
70
|
-
"[48;5;40m040[0m [48;5;41m041[0m [48;5;42m042[0m [48;5;43m043[0m [48;5;44m044[0m [48;5;45m045[0m \n",
|
71
|
-
"[48;5;46m050[0m [48;5;47m051[0m [48;5;48m052[0m [48;5;49m053[0m [48;5;50m054[0m [48;5;51m055[0m \n",
|
72
|
-
"\n",
|
73
|
-
"[48;5;52m100[0m [48;5;53m101[0m [48;5;54m102[0m [48;5;55m103[0m [48;5;56m104[0m [48;5;57m105[0m \n",
|
74
|
-
"[48;5;58m110[0m [48;5;59m111[0m [48;5;60m112[0m [48;5;61m113[0m [48;5;62m114[0m [48;5;63m115[0m \n",
|
75
|
-
"[48;5;64m120[0m [48;5;65m121[0m [48;5;66m122[0m [48;5;67m123[0m [48;5;68m124[0m [48;5;69m125[0m \n",
|
76
|
-
"[48;5;70m130[0m [48;5;71m131[0m [48;5;72m132[0m [48;5;73m133[0m [48;5;74m134[0m [48;5;75m135[0m \n",
|
77
|
-
"[48;5;76m140[0m [48;5;77m141[0m [48;5;78m142[0m [48;5;79m143[0m [48;5;80m144[0m [48;5;81m145[0m \n",
|
78
|
-
"[48;5;82m150[0m [48;5;83m151[0m [48;5;84m152[0m [48;5;85m153[0m [48;5;86m154[0m [48;5;87m155[0m \n",
|
79
|
-
"\n",
|
80
|
-
"[48;5;88m200[0m [48;5;89m201[0m [48;5;90m202[0m [48;5;91m203[0m [48;5;92m204[0m [48;5;93m205[0m \n",
|
81
|
-
"[48;5;94m210[0m [48;5;95m211[0m [48;5;96m212[0m [48;5;97m213[0m [48;5;98m214[0m [48;5;99m215[0m \n",
|
82
|
-
"[48;5;100m220[0m [48;5;101m221[0m [48;5;102m222[0m [48;5;103m223[0m [48;5;104m224[0m [48;5;105m225[0m \n",
|
83
|
-
"[48;5;106m230[0m [48;5;107m231[0m [48;5;108m232[0m [48;5;109m233[0m [48;5;110m234[0m [48;5;111m235[0m \n",
|
84
|
-
"[48;5;112m240[0m [48;5;113m241[0m [48;5;114m242[0m [48;5;115m243[0m [48;5;116m244[0m [48;5;117m245[0m \n",
|
85
|
-
"[48;5;118m250[0m [48;5;119m251[0m [48;5;120m252[0m [48;5;121m253[0m [48;5;122m254[0m [48;5;123m255[0m \n",
|
86
|
-
"\n",
|
87
|
-
"[48;5;124m300[0m [48;5;125m301[0m [48;5;126m302[0m [48;5;127m303[0m [48;5;128m304[0m [48;5;129m305[0m \n",
|
88
|
-
"[48;5;130m310[0m [48;5;131m311[0m [48;5;132m312[0m [48;5;133m313[0m [48;5;134m314[0m [48;5;135m315[0m \n",
|
89
|
-
"[48;5;136m320[0m [48;5;137m321[0m [48;5;138m322[0m [48;5;139m323[0m [48;5;140m324[0m [48;5;141m325[0m \n",
|
90
|
-
"[48;5;142m330[0m [48;5;143m331[0m [48;5;144m332[0m [48;5;145m333[0m [48;5;146m334[0m [48;5;147m335[0m \n",
|
91
|
-
"[48;5;148m340[0m [48;5;149m341[0m [48;5;150m342[0m [48;5;151m343[0m [48;5;152m344[0m [48;5;153m345[0m \n",
|
92
|
-
"[48;5;154m350[0m [48;5;155m351[0m [48;5;156m352[0m [48;5;157m353[0m [48;5;158m354[0m [48;5;159m355[0m \n",
|
93
|
-
"\n",
|
94
|
-
"[48;5;160m400[0m [48;5;161m401[0m [48;5;162m402[0m [48;5;163m403[0m [48;5;164m404[0m [48;5;165m405[0m \n",
|
95
|
-
"[48;5;166m410[0m [48;5;167m411[0m [48;5;168m412[0m [48;5;169m413[0m [48;5;170m414[0m [48;5;171m415[0m \n",
|
96
|
-
"[48;5;172m420[0m [48;5;173m421[0m [48;5;174m422[0m [48;5;175m423[0m [48;5;176m424[0m [48;5;177m425[0m \n",
|
97
|
-
"[48;5;178m430[0m [48;5;179m431[0m [48;5;180m432[0m [48;5;181m433[0m [48;5;182m434[0m [48;5;183m435[0m \n",
|
98
|
-
"[48;5;184m440[0m [48;5;185m441[0m [48;5;186m442[0m [48;5;187m443[0m [48;5;188m444[0m [48;5;189m445[0m \n",
|
99
|
-
"[48;5;190m450[0m [48;5;191m451[0m [48;5;192m452[0m [48;5;193m453[0m [48;5;194m454[0m [48;5;195m455[0m \n",
|
100
|
-
"\n",
|
101
|
-
"[48;5;196m500[0m [48;5;197m501[0m [48;5;198m502[0m [48;5;199m503[0m [48;5;200m504[0m [48;5;201m505[0m \n",
|
102
|
-
"[48;5;202m510[0m [48;5;203m511[0m [48;5;204m512[0m [48;5;205m513[0m [48;5;206m514[0m [48;5;207m515[0m \n",
|
103
|
-
"[48;5;208m520[0m [48;5;209m521[0m [48;5;210m522[0m [48;5;211m523[0m [48;5;212m524[0m [48;5;213m525[0m \n",
|
104
|
-
"[48;5;214m530[0m [48;5;215m531[0m [48;5;216m532[0m [48;5;217m533[0m [48;5;218m534[0m [48;5;219m535[0m \n",
|
105
|
-
"[48;5;220m540[0m [48;5;221m541[0m [48;5;222m542[0m [48;5;223m543[0m [48;5;224m544[0m [48;5;225m545[0m \n",
|
106
|
-
"[48;5;226m550[0m [48;5;227m551[0m [48;5;228m552[0m [48;5;229m553[0m [48;5;230m554[0m [48;5;231m555[0m \n",
|
107
|
-
"\n",
|
108
|
-
]
|
109
|
-
|
110
|
-
assert_print expected, :print_backgrounds
|
111
|
-
end
|
112
|
-
|
113
|
-
def test_combinations
|
114
|
-
# not checking this, since it is over 9000 lines of output:
|
115
|
-
expected = [
|
116
|
-
# a lot
|
117
|
-
]
|
118
|
-
|
119
|
-
# assert_print expected, :print_combinations
|
120
|
-
end
|
121
|
-
end
|
122
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby -w
|
2
|
-
# -*- ruby -*-
|
3
|
-
|
4
|
-
require 'test/unit'
|
5
|
-
require 'riel/text/highlightable'
|
6
|
-
require 'riel/text/ansi/ansi_highlight'
|
7
|
-
require 'riel/text/string'
|
8
|
-
|
9
|
-
class HighlightableTestCase < Test::Unit::TestCase
|
10
|
-
def test_string_add_to
|
11
|
-
Text::Highlightable.add_to String
|
12
|
-
assert_equal "\e[34mfoo\e[0m", "foo".blue
|
13
|
-
end
|
14
|
-
|
15
|
-
def test_string_include
|
16
|
-
assert_equal "\e[34mfoo\e[0m", "foo".blue
|
17
|
-
end
|
18
|
-
|
19
|
-
def test_string_respond_to
|
20
|
-
str = ""
|
21
|
-
assert str.respond_to? :blue
|
22
|
-
assert !str.respond_to?(:azure)
|
23
|
-
end
|
24
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby -w
|
2
|
-
# -*- ruby -*-
|
3
|
-
|
4
|
-
require 'test/unit'
|
5
|
-
require 'riel/text/ansi/ansi_highlight'
|
6
|
-
require 'riel/text/string'
|
7
|
-
|
8
|
-
class StringTestCase < Test::Unit::TestCase
|
9
|
-
def run_test str, input, *chars
|
10
|
-
escape_sequence = chars.collect { |ch| "\e[#{ch}m" }.join("")
|
11
|
-
assert_equal "#{escape_sequence}#{str}\e[0m", input
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_all_ansi
|
15
|
-
Text::Highlightable.add_to String
|
16
|
-
str = "precision"
|
17
|
-
|
18
|
-
run_test str, str.none, 0
|
19
|
-
run_test str, str.bold, 1
|
20
|
-
run_test str, str.underline, 4
|
21
|
-
run_test str, str.underscore, 4
|
22
|
-
run_test str, str.blink, 5 # every geocities site circa 1998
|
23
|
-
run_test str, str.negative, 7
|
24
|
-
run_test str, str.concealed, 8
|
25
|
-
run_test str, str.black, 30
|
26
|
-
run_test str, str.red, 31
|
27
|
-
run_test str, str.green, 32
|
28
|
-
run_test str, str.yellow, 33
|
29
|
-
run_test str, str.blue, 34
|
30
|
-
run_test str, str.magenta, 35
|
31
|
-
run_test str, str.cyan, 36
|
32
|
-
run_test str, str.white, 37
|
33
|
-
run_test str, str.on_black, 40
|
34
|
-
run_test str, str.on_red, 41
|
35
|
-
run_test str, str.on_green, 42
|
36
|
-
run_test str, str.on_yellow, 43
|
37
|
-
run_test str, str.on_blue, 44
|
38
|
-
run_test str, str.on_magenta, 45
|
39
|
-
run_test str, str.on_cyan, 46
|
40
|
-
run_test str, str.on_white, 47
|
41
|
-
run_test str, str.none_on_white, 0, 47
|
42
|
-
run_test str, str.none_on_black, 0, 40
|
43
|
-
run_test str, str.none_on_blue, 0, 44
|
44
|
-
run_test str, str.red_on_white, 31, 47
|
45
|
-
run_test str, str.bold_red_on_white, 1, 31, 47
|
46
|
-
end
|
47
|
-
end
|
data/test/riel/text_test.rb
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
#!/usr/bin/ruby -w
|
2
|
-
# -*- ruby -*-
|
3
|
-
|
4
|
-
require 'test/unit'
|
5
|
-
require 'riel/text'
|
6
|
-
|
7
|
-
class TextTestCase < Test::Unit::TestCase
|
8
|
-
def run_html_test expected, input
|
9
|
-
assert_equal expected, input
|
10
|
-
end
|
11
|
-
|
12
|
-
def xxx_disabled_test_html_highlight
|
13
|
-
String.highlighter = "HTML"
|
14
|
-
|
15
|
-
str = "precision"
|
16
|
-
|
17
|
-
run_html_test str, str.none
|
18
|
-
run_html_test "<b>" + str + "</b>", str.bold
|
19
|
-
|
20
|
-
[ str.underline, str.underscore ].each do |input|
|
21
|
-
run_html_test "<u>" + str + "</u>", input
|
22
|
-
end
|
23
|
-
|
24
|
-
run_html_test "<blink>" + str + "</blink>", str.blink
|
25
|
-
run_html_test "<span style=\"color: white; background-color: black\">" + str + "</span>", str.negative
|
26
|
-
run_html_test "<!-- " + str + " -->", str.concealed
|
27
|
-
run_html_test "<span style=\"color: black\">" + str + "</span>", str.black
|
28
|
-
run_html_test "<span style=\"color: red\">" + str + "</span>", str.red
|
29
|
-
run_html_test "<span style=\"color: green\">" + str + "</span>", str.green
|
30
|
-
run_html_test "<span style=\"color: yellow\">" + str + "</span>", str.yellow
|
31
|
-
run_html_test "<span style=\"color: blue\">" + str + "</span>", str.blue
|
32
|
-
run_html_test "<span style=\"color: #FF00FF\">" + str + "</span>", str.magenta
|
33
|
-
run_html_test "<span style=\"color: #00FFFF\">" + str + "</span>", str.cyan
|
34
|
-
run_html_test "<span style=\"color: white\">" + str + "</span>", str.white
|
35
|
-
run_html_test "<span style=\"background-color: black\">" + str + "</span>", str.on_black
|
36
|
-
run_html_test "<span style=\"background-color: red\">" + str + "</span>", str.on_red
|
37
|
-
run_html_test "<span style=\"background-color: green\">" + str + "</span>", str.on_green
|
38
|
-
run_html_test "<span style=\"background-color: yellow\">" + str + "</span>", str.on_yellow
|
39
|
-
run_html_test "<span style=\"background-color: blue\">" + str + "</span>", str.on_blue
|
40
|
-
run_html_test "<span style=\"background-color: #FF00FF\">" + str + "</span>", str.on_magenta
|
41
|
-
run_html_test "<span style=\"background-color: #00FFFF\">" + str + "</span>", str.on_cyan
|
42
|
-
run_html_test "<span style=\"background-color: white\">" + str + "</span>", str.on_white
|
43
|
-
run_html_test "<span style=\"background-color: white\">" + str + "</span>", str.none_on_white
|
44
|
-
run_html_test "<span style=\"background-color: black\">" + str + "</span>", str.none_on_black
|
45
|
-
run_html_test "<span style=\"background-color: blue\">" + str + "</span>", str.none_on_blue
|
46
|
-
run_html_test "<span style=\"color: red\">" + "<span style=\"background-color: white\">" + str + "</span>" + "</span>", str.red_on_white
|
47
|
-
run_html_test "<b><span style=\"color: red\">" + "<span style=\"background-color: white\">" + str + "</span>" + "</span></b>", str.bold_red_on_white
|
48
|
-
end
|
49
|
-
|
50
|
-
def xxx_disabled_test_string_reverse
|
51
|
-
String.highlighter = "HTML"
|
52
|
-
|
53
|
-
str = "precision"
|
54
|
-
|
55
|
-
# string.reverse does not mean ANSI reverse:
|
56
|
-
assert_equal "noisicerp", str.reverse
|
57
|
-
end
|
58
|
-
|
59
|
-
def test_nothing
|
60
|
-
|
61
|
-
end
|
62
|
-
end
|