vedeu 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -0
- data/README.md +1 -2
- data/Rakefile +5 -5
- data/bin/vedeu +8 -4
- data/docs/api.md +3 -1
- data/docs/events.md +43 -29
- data/docs/getting_started.md +2 -0
- data/examples/cursor_app/cursor_app.rb +85 -0
- data/examples/lines_app/lines_app.rb +60 -0
- data/lib/vedeu.rb +9 -3
- data/lib/vedeu/api/api.rb +28 -7
- data/lib/vedeu/api/composition.rb +2 -0
- data/lib/vedeu/api/helpers.rb +2 -0
- data/lib/vedeu/api/interface.rb +2 -20
- data/lib/vedeu/api/keymap.rb +2 -0
- data/lib/vedeu/api/line.rb +2 -0
- data/lib/vedeu/api/menu.rb +3 -1
- data/lib/vedeu/api/stream.rb +25 -2
- data/lib/vedeu/application.rb +4 -4
- data/lib/vedeu/configuration/api.rb +327 -0
- data/lib/vedeu/configuration/cli.rb +110 -0
- data/lib/vedeu/{configuration.rb → configuration/configuration.rb} +49 -99
- data/lib/vedeu/launcher.rb +0 -1
- data/lib/vedeu/models/attributes/colour_translator.rb +2 -2
- data/lib/vedeu/models/colour.rb +0 -1
- data/lib/vedeu/models/composition.rb +2 -8
- data/lib/vedeu/models/cursor.rb +261 -0
- data/lib/vedeu/models/geometry.rb +11 -19
- data/lib/vedeu/models/interface.rb +2 -12
- data/lib/vedeu/models/keymap.rb +2 -0
- data/lib/vedeu/models/line.rb +2 -0
- data/lib/vedeu/models/stream.rb +2 -0
- data/lib/vedeu/models/style.rb +2 -0
- data/lib/vedeu/output/clear.rb +0 -1
- data/lib/vedeu/output/compositor.rb +0 -1
- data/lib/vedeu/output/refresh.rb +3 -0
- data/lib/vedeu/output/render.rb +12 -6
- data/lib/vedeu/output/view.rb +1 -0
- data/lib/vedeu/repositories/cursors.rb +98 -0
- data/lib/vedeu/repositories/events.rb +0 -1
- data/lib/vedeu/repositories/focus.rb +18 -0
- data/lib/vedeu/repositories/menus.rb +4 -4
- data/lib/vedeu/support/common.rb +2 -1
- data/lib/vedeu/support/event.rb +1 -10
- data/lib/vedeu/support/grid.rb +1 -2
- data/lib/vedeu/{repositories → support}/keymap_validator.rb +5 -4
- data/lib/vedeu/support/log.rb +3 -0
- data/lib/vedeu/support/menu.rb +4 -1
- data/lib/vedeu/support/registrar.rb +2 -1
- data/test/integration/defining_interfaces_test.rb +0 -1
- data/test/integration/views/basic_view_test.rb +741 -739
- data/test/lib/vedeu/api/api_test.rb +14 -3
- data/test/lib/vedeu/api/helpers_test.rb +3 -3
- data/test/lib/vedeu/api/interface_test.rb +17 -70
- data/test/lib/vedeu/api/keymap_test.rb +2 -0
- data/test/lib/vedeu/api/line_test.rb +4 -4
- data/test/lib/vedeu/api/menu_test.rb +6 -5
- data/test/lib/vedeu/api/stream_test.rb +18 -0
- data/test/lib/vedeu/configuration/api_test.rb +248 -0
- data/test/lib/vedeu/configuration/cli_test.rb +88 -0
- data/test/lib/vedeu/configuration/configuration_test.rb +67 -0
- data/test/lib/vedeu/input/input_test.rb +2 -2
- data/test/lib/vedeu/models/attributes/background_test.rb +3 -3
- data/test/lib/vedeu/models/attributes/foreground_test.rb +3 -3
- data/test/lib/vedeu/models/composition_test.rb +0 -222
- data/test/lib/vedeu/models/cursor_test.rb +164 -0
- data/test/lib/vedeu/models/interface_test.rb +0 -11
- data/test/lib/vedeu/output/compositor_test.rb +2 -4
- data/test/lib/vedeu/output/render_test.rb +4 -41
- data/test/lib/vedeu/repositories/cursors_test.rb +13 -0
- data/test/lib/vedeu/repositories/focus_test.rb +14 -4
- data/test/lib/vedeu/repositories/menus_test.rb +36 -29
- data/test/lib/vedeu/{repositories → support}/keymap_validator_test.rb +0 -0
- data/test/lib/vedeu/support/menu_test.rb +3 -3
- data/test/lib/vedeu/support/registrar_test.rb +6 -0
- data/test/lib/vedeu/support/terminal_test.rb +2 -2
- data/test/test_helper.rb +1 -1
- data/vedeu.gemspec +1 -1
- metadata +23 -14
- data/elements.txt +0 -118
- data/lib/vedeu/support/cursor.rb +0 -96
- data/test/lib/vedeu/configuration_test.rb +0 -154
- data/test/lib/vedeu/support/cursor_test.rb +0 -79
- data/test/support/model_test_data.json +0 -437
data/lib/vedeu/support/log.rb
CHANGED
@@ -3,6 +3,7 @@ require 'time'
|
|
3
3
|
|
4
4
|
module Vedeu
|
5
5
|
# :nocov:
|
6
|
+
# @api private
|
6
7
|
class MonoLogger < Logger
|
7
8
|
# Create a trappable Logger instance.
|
8
9
|
#
|
@@ -86,6 +87,8 @@ module Vedeu
|
|
86
87
|
|
87
88
|
# Provides the ability to Log anything to the Vedeu log file which is
|
88
89
|
# hard-coded to reside in `$HOME/.vedeu/vedeu.log`.
|
90
|
+
#
|
91
|
+
# @api private
|
89
92
|
class Log
|
90
93
|
|
91
94
|
# @return [TrueClass]
|
data/lib/vedeu/support/menu.rb
CHANGED
@@ -3,14 +3,17 @@ module Vedeu
|
|
3
3
|
# Converts the collection passed into a list of menu items which can be
|
4
4
|
# navigated using the instance methods or events provided.
|
5
5
|
#
|
6
|
+
# @api private
|
6
7
|
class Menu
|
7
8
|
|
8
9
|
# Returns a new instance of Menu.
|
9
10
|
#
|
10
11
|
# @param collection [Array]
|
12
|
+
# @param name [String]
|
11
13
|
# @return [Menu]
|
12
|
-
def initialize(collection)
|
14
|
+
def initialize(collection, name = '')
|
13
15
|
@collection = collection
|
16
|
+
@name = name
|
14
17
|
@current = 0
|
15
18
|
@selected = nil
|
16
19
|
end
|
@@ -30,6 +30,8 @@ module Vedeu
|
|
30
30
|
|
31
31
|
Vedeu::Interfaces.add(attributes)
|
32
32
|
|
33
|
+
Vedeu::Cursors.add(attributes)
|
34
|
+
|
33
35
|
Vedeu::Groups.add(attributes)
|
34
36
|
|
35
37
|
Vedeu::Focus.add(attributes)
|
@@ -39,7 +41,6 @@ module Vedeu
|
|
39
41
|
|
40
42
|
private
|
41
43
|
|
42
|
-
# Client application defined settings for interfaces etc.
|
43
44
|
attr_reader :attributes
|
44
45
|
|
45
46
|
# At present, validates that attributes has a `:name` key that is not nil or
|
@@ -1,767 +1,769 @@
|
|
1
|
-
|
1
|
+
require 'test_helper'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
module Vedeu
|
4
|
+
module API
|
5
|
+
describe Interface do
|
6
|
+
describe '#build' do
|
7
|
+
before do
|
8
|
+
@interface = Vedeu.interface('testing_view') do
|
9
|
+
x 1
|
10
|
+
y 1
|
11
|
+
colour foreground: '#ffffff', background: '#000000'
|
12
|
+
centred false
|
13
|
+
end
|
14
|
+
end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
16
|
+
it 'builds a basic view' do
|
17
|
+
Vedeu.view 'testing_view' do
|
18
|
+
line do
|
19
|
+
text 'All text declarations within a line '
|
20
|
+
text 'are treated as one line.'
|
21
|
+
end
|
22
|
+
end.must_equal(
|
23
|
+
{ interfaces: [{
|
24
|
+
name: 'testing_view',
|
25
|
+
group: '',
|
26
|
+
colour: {},
|
27
|
+
style: '',
|
28
|
+
geometry: {},
|
29
|
+
delay: 0.0,
|
30
|
+
parent: {},
|
31
|
+
lines: [
|
32
|
+
{
|
33
|
+
parent: {colour: {}, style: ''},
|
34
|
+
colour: {},
|
35
|
+
style: [],
|
36
|
+
streams: [
|
37
|
+
{
|
38
|
+
text: 'All text declarations within a line '
|
39
|
+
}, {
|
40
|
+
text: 'are treated as one line.'
|
41
|
+
}
|
42
|
+
]
|
43
|
+
}
|
44
|
+
]
|
45
|
+
}] }
|
46
|
+
)
|
47
|
+
end
|
48
48
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
49
|
+
it 'handles coloured lines' do
|
50
|
+
Vedeu.view 'testing_view' do
|
51
|
+
line do
|
52
|
+
text '1. Line without colours.'
|
53
|
+
end
|
54
|
+
end.must_equal(
|
55
|
+
{ interfaces: [{
|
56
|
+
name: 'testing_view',
|
57
|
+
group: '',
|
58
|
+
colour: {},
|
59
|
+
style: '',
|
60
|
+
geometry: {},
|
61
|
+
delay: 0.0,
|
62
|
+
parent: {},
|
63
|
+
lines: [
|
64
|
+
{
|
65
|
+
parent: {colour: {}, style: ''},
|
66
|
+
colour: {},
|
67
|
+
style: [],
|
68
|
+
streams: [{ text: '1. Line without colours.' }]
|
69
|
+
}
|
70
|
+
]
|
71
|
+
}] }
|
72
|
+
)
|
73
|
+
end
|
74
74
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
75
|
+
it 'handles coloured lines' do
|
76
|
+
Vedeu.view 'testing_view' do
|
77
|
+
line do
|
78
|
+
colour background: '#ff0000', foreground: '#ffff00'
|
79
|
+
text '2. Line with colours.'
|
80
|
+
end
|
81
|
+
end.must_equal(
|
82
|
+
{ interfaces: [{
|
83
|
+
name: 'testing_view',
|
84
|
+
group: '',
|
85
|
+
colour: {},
|
86
|
+
style: '',
|
87
|
+
geometry: {},
|
88
|
+
delay: 0.0,
|
89
|
+
parent: {},
|
90
|
+
lines: [
|
91
|
+
{
|
92
|
+
parent: {colour: {}, style: ''},
|
93
|
+
colour: { background: '#ff0000', foreground: '#ffff00' },
|
94
|
+
style: [],
|
95
|
+
streams: [{ text: '2. Line with colours.' }]
|
96
|
+
}
|
97
|
+
]
|
98
|
+
}] }
|
99
|
+
)
|
100
|
+
end
|
101
101
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
102
|
+
it 'handles coloured lines' do
|
103
|
+
Vedeu.view 'testing_view' do
|
104
|
+
line do
|
105
|
+
colour foreground: '#a7ff00', background: '#005700'
|
106
|
+
text '3. Line with explicit colour declaration.'
|
107
|
+
end
|
108
|
+
end.must_equal(
|
109
|
+
{ interfaces: [{
|
110
|
+
name: 'testing_view',
|
111
|
+
group: '',
|
112
|
+
colour: {},
|
113
|
+
style: '',
|
114
|
+
geometry: {},
|
115
|
+
delay: 0.0,
|
116
|
+
parent: {},
|
117
|
+
lines: [
|
118
|
+
{
|
119
|
+
parent: {colour: {}, style: ''},
|
120
|
+
colour: { background: '#005700', foreground: '#a7ff00' },
|
121
|
+
style: [],
|
122
|
+
streams: [{ text: '3. Line with explicit colour declaration.' }]
|
123
|
+
}
|
124
|
+
]
|
125
|
+
}] }
|
126
|
+
)
|
127
|
+
end
|
128
128
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
129
|
+
it 'handles coloured lines' do
|
130
|
+
Vedeu.view 'testing_view' do
|
131
|
+
line do # actually uses streams
|
132
|
+
foreground '#ff00ff' do
|
133
|
+
text '4. Line with only foreground set.'
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end.must_equal(
|
137
|
+
{ interfaces: [{
|
138
|
+
name: 'testing_view',
|
139
|
+
group: '',
|
140
|
+
colour: {},
|
141
|
+
style: '',
|
142
|
+
geometry: {},
|
143
|
+
delay: 0.0,
|
144
|
+
parent: {},
|
145
|
+
lines: [
|
146
|
+
{
|
147
|
+
parent: {colour: {}, style: ''},
|
148
|
+
colour: {},
|
149
|
+
style: [],
|
150
|
+
streams: [{
|
151
|
+
colour: { foreground: '#ff00ff' },
|
152
|
+
style: [],
|
153
|
+
text: '4. Line with only foreground set.',
|
154
|
+
width: nil,
|
155
|
+
align: :left,
|
156
|
+
parent: {colour: {}, style: []},
|
157
|
+
}]
|
158
|
+
}
|
159
|
+
]
|
160
|
+
}] }
|
161
|
+
)
|
162
|
+
end
|
163
163
|
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
164
|
+
it 'handles coloured lines' do
|
165
|
+
Vedeu.view 'testing_view' do
|
166
|
+
line do # actually uses streams
|
167
|
+
background '#00ff00' do
|
168
|
+
text '5. Line with only background set.'
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end.must_equal(
|
172
|
+
{ interfaces: [{
|
173
|
+
name: 'testing_view',
|
174
|
+
group: '',
|
175
|
+
colour: {},
|
176
|
+
style: '',
|
177
|
+
geometry: {},
|
178
|
+
delay: 0.0,
|
179
|
+
parent: {},
|
180
|
+
lines: [
|
181
|
+
{
|
182
|
+
parent: {colour: {}, style: ''},
|
183
|
+
colour: {},
|
184
|
+
style: [],
|
185
|
+
streams: [{
|
186
|
+
colour: { background: '#00ff00' },
|
187
|
+
style: [],
|
188
|
+
text: '5. Line with only background set.',
|
189
|
+
width: nil,
|
190
|
+
align: :left,
|
191
|
+
parent: {colour: {}, style: []},
|
192
|
+
}]
|
193
|
+
}
|
194
|
+
]
|
195
|
+
}] }
|
196
|
+
)
|
197
|
+
end
|
198
198
|
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
199
|
+
it 'handles styles' do
|
200
|
+
Vedeu.view 'testing_view' do
|
201
|
+
line do
|
202
|
+
style 'normal'
|
203
|
+
text '1. Line with a normal style.'
|
204
|
+
end
|
205
|
+
end.must_equal(
|
206
|
+
{ interfaces: [{
|
207
|
+
name: 'testing_view',
|
208
|
+
group: '',
|
209
|
+
colour: {},
|
210
|
+
style: '',
|
211
|
+
geometry: {},
|
212
|
+
delay: 0.0,
|
213
|
+
parent: {},
|
214
|
+
lines: [
|
215
|
+
{
|
216
|
+
parent: {colour: {}, style: ''},
|
217
|
+
colour: {},
|
218
|
+
style: ['normal'],
|
219
|
+
streams: [{
|
220
|
+
text: '1. Line with a normal style.'
|
221
|
+
}]
|
222
|
+
}
|
223
|
+
]
|
224
|
+
}] }
|
225
|
+
)
|
226
|
+
end
|
227
227
|
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
228
|
+
it 'handles styles' do
|
229
|
+
Vedeu.view 'testing_view' do
|
230
|
+
line do
|
231
|
+
style 'underline'
|
232
|
+
text '2. Line with an underline style.'
|
233
|
+
end
|
234
|
+
end.must_equal(
|
235
|
+
{ interfaces: [{
|
236
|
+
name: 'testing_view',
|
237
|
+
group: '',
|
238
|
+
colour: {},
|
239
|
+
style: '',
|
240
|
+
geometry: {},
|
241
|
+
delay: 0.0,
|
242
|
+
parent: {},
|
243
|
+
lines: [
|
244
|
+
{
|
245
|
+
parent: {colour: {}, style: ''},
|
246
|
+
colour: {},
|
247
|
+
style: ['underline'],
|
248
|
+
streams: [{
|
249
|
+
text: '2. Line with an underline style.'
|
250
|
+
}]
|
251
|
+
}
|
252
|
+
]
|
253
|
+
}] }
|
254
|
+
)
|
255
|
+
end
|
256
256
|
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
257
|
+
it 'handles styles' do
|
258
|
+
Vedeu.view 'testing_view' do
|
259
|
+
line do # actually uses streams
|
260
|
+
style 'normal' do
|
261
|
+
text '3. Line with a normal style.'
|
262
|
+
end
|
263
|
+
end
|
264
|
+
end.must_equal(
|
265
|
+
{ interfaces: [{
|
266
|
+
name: 'testing_view',
|
267
|
+
group: '',
|
268
|
+
colour: {},
|
269
|
+
style: '',
|
270
|
+
geometry: {},
|
271
|
+
delay: 0.0,
|
272
|
+
parent: {},
|
273
|
+
lines: [
|
274
|
+
{
|
275
|
+
parent: {colour: {}, style: ''},
|
276
|
+
colour: {},
|
277
|
+
style: [],
|
278
|
+
streams: [{
|
279
|
+
colour: {},
|
280
|
+
style: ['normal'],
|
281
|
+
text: '3. Line with a normal style.',
|
282
|
+
width: nil,
|
283
|
+
align: :left,
|
284
|
+
parent: nil,
|
285
|
+
}]
|
286
|
+
}
|
287
|
+
]
|
288
|
+
}] }
|
289
|
+
)
|
290
|
+
end
|
291
291
|
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
292
|
+
it 'handles styles' do
|
293
|
+
Vedeu.view 'testing_view' do
|
294
|
+
line do # actually uses streams
|
295
|
+
style 'underline' do
|
296
|
+
text '4. Line with an underlined style.'
|
297
|
+
end
|
298
|
+
end
|
299
|
+
end.must_equal(
|
300
|
+
{ interfaces: [{
|
301
|
+
name: 'testing_view',
|
302
|
+
group: '',
|
303
|
+
colour: {},
|
304
|
+
style: '',
|
305
|
+
geometry: {},
|
306
|
+
delay: 0.0,
|
307
|
+
parent: {},
|
308
|
+
lines: [
|
309
|
+
{
|
310
|
+
parent: {colour: {}, style: ''},
|
311
|
+
colour: {},
|
312
|
+
style: [],
|
313
|
+
streams: [{
|
314
|
+
colour: {},
|
315
|
+
style: ['underline'],
|
316
|
+
text: '4. Line with an underlined style.',
|
317
|
+
width: nil,
|
318
|
+
align: :left,
|
319
|
+
parent: nil,
|
320
|
+
}]
|
321
|
+
}
|
322
|
+
]
|
323
|
+
}] }
|
324
|
+
)
|
325
|
+
end
|
326
326
|
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
327
|
+
it 'handles streams, which means sub-line colours and styles' do
|
328
|
+
Vedeu.view 'testing_view' do
|
329
|
+
line do
|
330
|
+
stream do
|
331
|
+
text 'A stream of text.'
|
332
|
+
end
|
333
|
+
end
|
334
|
+
end.must_equal(
|
335
|
+
{ interfaces: [{
|
336
|
+
name: 'testing_view',
|
337
|
+
group: '',
|
338
|
+
colour: {},
|
339
|
+
style: '',
|
340
|
+
geometry: {},
|
341
|
+
delay: 0.0,
|
342
|
+
parent: {},
|
343
|
+
lines: [
|
344
|
+
{
|
345
|
+
parent: {colour: {}, style: ''},
|
346
|
+
colour: {},
|
347
|
+
style: [],
|
348
|
+
streams: [
|
349
|
+
{
|
350
|
+
parent: {colour: {}, style: []},
|
351
|
+
colour: {},
|
352
|
+
style: [],
|
353
|
+
text: 'A stream of text.',
|
354
|
+
width: nil,
|
355
|
+
align: :left
|
356
|
+
}
|
357
|
+
]
|
358
|
+
}
|
359
|
+
]
|
360
|
+
}] }
|
361
|
+
)
|
362
|
+
end
|
363
363
|
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
#
|
369
|
-
#
|
370
|
-
|
371
|
-
|
364
|
+
it 'handles streams, which means sub-line colours and styles' do
|
365
|
+
Vedeu.view 'testing_view' do
|
366
|
+
line do
|
367
|
+
stream do # Stream is an 'explicit declaration'.
|
368
|
+
# We don't need it unless we want to add colours and styles.
|
369
|
+
# See below.
|
370
|
+
text '1. Two streams of text, these will be'
|
371
|
+
end
|
372
372
|
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
373
|
+
stream do
|
374
|
+
text ' on the same line- note the space.'
|
375
|
+
end
|
376
|
+
end
|
377
|
+
end.must_equal(
|
378
|
+
{ interfaces: [{
|
379
|
+
name: 'testing_view',
|
380
|
+
group: '',
|
381
|
+
colour: {},
|
382
|
+
style: '',
|
383
|
+
geometry: {},
|
384
|
+
delay: 0.0,
|
385
|
+
parent: {},
|
386
|
+
lines: [
|
387
|
+
{
|
388
|
+
parent: {colour: {}, style: ''},
|
389
|
+
colour: {},
|
390
|
+
style: [],
|
391
|
+
streams: [
|
392
|
+
{
|
393
|
+
colour: {},
|
394
|
+
style: [],
|
395
|
+
text: '1. Two streams of text, these will be',
|
396
|
+
width: nil,
|
397
|
+
align: :left,
|
398
|
+
parent: {colour: {}, style: []},
|
399
|
+
}, {
|
400
|
+
colour: {},
|
401
|
+
style: [],
|
402
|
+
text: ' on the same line- note the space.',
|
403
|
+
width: nil,
|
404
|
+
align: :left,
|
405
|
+
parent: {colour: {}, style: []},
|
406
|
+
}
|
407
|
+
]
|
408
|
+
}
|
409
|
+
]
|
410
|
+
}] }
|
411
|
+
)
|
412
|
+
end
|
413
413
|
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
414
|
+
it 'handles streams, which means sub-line colours and styles' do
|
415
|
+
Vedeu.view 'testing_view' do
|
416
|
+
line do
|
417
|
+
stream do
|
418
|
+
text '2. Streams can have'
|
419
|
+
end
|
420
420
|
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
421
|
+
stream do
|
422
|
+
colour foreground: '#ff0000', background: '#00ff00'
|
423
|
+
text ' colours too.'
|
424
|
+
end
|
425
|
+
end
|
426
|
+
end.must_equal(
|
427
|
+
{ interfaces: [{
|
428
|
+
name: 'testing_view',
|
429
|
+
group: '',
|
430
|
+
colour: {},
|
431
|
+
style: '',
|
432
|
+
geometry: {},
|
433
|
+
delay: 0.0,
|
434
|
+
parent: {},
|
435
|
+
lines: [
|
436
|
+
{
|
437
|
+
parent: {colour: {}, style: ''},
|
438
|
+
colour: {},
|
439
|
+
style: [],
|
440
|
+
streams: [
|
441
|
+
{
|
442
|
+
colour: {},
|
443
|
+
style: [],
|
444
|
+
text: '2. Streams can have',
|
445
|
+
width: nil,
|
446
|
+
align: :left,
|
447
|
+
parent: {colour: {}, style: []},
|
448
|
+
}, {
|
449
|
+
colour: {
|
450
|
+
foreground: '#ff0000',
|
451
|
+
background: '#00ff00'
|
452
|
+
},
|
453
|
+
style: [],
|
454
|
+
text: ' colours too.',
|
455
|
+
width: nil,
|
456
|
+
align: :left,
|
457
|
+
parent: {colour: {}, style: []},
|
458
|
+
}
|
459
|
+
]
|
460
|
+
}
|
461
|
+
]
|
462
|
+
}] }
|
463
|
+
)
|
464
|
+
end
|
465
465
|
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
466
|
+
it 'handles streams, which means sub-line colours and styles' do
|
467
|
+
Vedeu.view 'testing_view' do
|
468
|
+
line do
|
469
|
+
stream do
|
470
|
+
text '3. Streams can have'
|
471
|
+
end
|
472
472
|
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
473
|
+
stream do
|
474
|
+
style 'underline'
|
475
|
+
text ' styles too.'
|
476
|
+
end
|
477
|
+
end
|
478
|
+
end.must_equal(
|
479
|
+
{ interfaces: [{
|
480
|
+
name: 'testing_view',
|
481
|
+
group: '',
|
482
|
+
colour: {},
|
483
|
+
style: '',
|
484
|
+
geometry: {},
|
485
|
+
delay: 0.0,
|
486
|
+
parent: {},
|
487
|
+
lines: [
|
488
|
+
{
|
489
|
+
parent: {colour: {}, style: ''},
|
490
|
+
colour: {},
|
491
|
+
style: [],
|
492
|
+
streams: [
|
493
|
+
{
|
494
|
+
colour: {},
|
495
|
+
style: [],
|
496
|
+
text: '3. Streams can have',
|
497
|
+
width: nil,
|
498
|
+
align: :left,
|
499
|
+
parent: {colour: {}, style: []},
|
500
|
+
}, {
|
501
|
+
colour: {},
|
502
|
+
style: ['underline'],
|
503
|
+
text: ' styles too.',
|
504
|
+
width: nil,
|
505
|
+
align: :left,
|
506
|
+
parent: {colour: {}, style: []},
|
507
|
+
}
|
508
|
+
]
|
509
|
+
}
|
510
|
+
]
|
511
|
+
}] }
|
512
|
+
)
|
513
|
+
end
|
514
514
|
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
515
|
+
it 'handles alignment' do
|
516
|
+
Vedeu.view 'testing_view' do
|
517
|
+
line do
|
518
|
+
stream do
|
519
|
+
width 80
|
520
|
+
text 'This is aligned left, and padded with spaces.'
|
521
|
+
end
|
522
|
+
end
|
523
|
+
end.must_equal(
|
524
|
+
{ interfaces: [{
|
525
|
+
name: 'testing_view',
|
526
|
+
group: '',
|
527
|
+
colour: {},
|
528
|
+
style: '',
|
529
|
+
geometry: {},
|
530
|
+
delay: 0.0,
|
531
|
+
parent: {},
|
532
|
+
lines: [{
|
533
|
+
parent: {colour: {}, style: ''},
|
534
|
+
colour: {},
|
535
|
+
style: [],
|
536
|
+
streams: [{
|
537
|
+
parent: {colour: {}, style: []},
|
538
|
+
align: :left,
|
539
|
+
colour: {},
|
540
|
+
style: [],
|
541
|
+
width: 80,
|
542
|
+
text: 'This is aligned left, and padded with spaces.'
|
543
|
+
}]
|
544
|
+
}]
|
545
|
+
}] }
|
546
|
+
)
|
547
|
+
end
|
548
548
|
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
549
|
+
it 'handles alignment' do
|
550
|
+
Vedeu.view 'testing_view' do
|
551
|
+
line do
|
552
|
+
stream do
|
553
|
+
width 80
|
554
|
+
align :left # explicit
|
555
|
+
text 'This is aligned left, and padded with spaces.'
|
556
|
+
end
|
557
|
+
end
|
558
|
+
end.must_equal(
|
559
|
+
{ interfaces: [{
|
560
|
+
name: 'testing_view',
|
561
|
+
group: '',
|
562
|
+
colour: {},
|
563
|
+
style: '',
|
564
|
+
geometry: {},
|
565
|
+
delay: 0.0,
|
566
|
+
parent: {},
|
567
|
+
lines: [{
|
568
|
+
parent: {colour: {}, style: ''},
|
569
|
+
colour: {},
|
570
|
+
style: [],
|
571
|
+
streams: [{
|
572
|
+
parent: {colour: {}, style: []},
|
573
|
+
colour: {},
|
574
|
+
style: [],
|
575
|
+
width: 80,
|
576
|
+
align: :left,
|
577
|
+
text: 'This is aligned left, and padded with spaces.'
|
578
|
+
}]
|
579
|
+
}]
|
580
|
+
}] }
|
581
|
+
)
|
582
|
+
end
|
583
583
|
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
584
|
+
it 'handles alignment' do
|
585
|
+
Vedeu.view 'testing_view' do
|
586
|
+
line do
|
587
|
+
stream do
|
588
|
+
width 80
|
589
|
+
align :centre
|
590
|
+
text 'This is aligned centrally, and padded with spaces.'
|
591
|
+
end
|
592
|
+
end
|
593
|
+
end.must_equal(
|
594
|
+
{ interfaces: [{
|
595
|
+
name: 'testing_view',
|
596
|
+
group: '',
|
597
|
+
colour: {},
|
598
|
+
style: '',
|
599
|
+
geometry: {},
|
600
|
+
delay: 0.0,
|
601
|
+
parent: {},
|
602
|
+
lines: [{
|
603
|
+
parent: {colour: {}, style: ''},
|
604
|
+
colour: {},
|
605
|
+
style: [],
|
606
|
+
streams: [{
|
607
|
+
parent: {colour: {}, style: []},
|
608
|
+
colour: {},
|
609
|
+
style: [],
|
610
|
+
width: 80,
|
611
|
+
align: :centre,
|
612
|
+
text: 'This is aligned centrally, and padded with spaces.'
|
613
|
+
}]
|
614
|
+
}]
|
615
|
+
}] }
|
616
|
+
)
|
617
|
+
end
|
618
618
|
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
619
|
+
it 'handles alignment' do
|
620
|
+
Vedeu.view 'testing_view' do
|
621
|
+
line do
|
622
|
+
stream do
|
623
|
+
width 80
|
624
|
+
align :right
|
625
|
+
text 'This is aligned right, and padded with spaces.'
|
626
|
+
end
|
627
|
+
end
|
628
|
+
end.must_equal(
|
629
|
+
{ interfaces: [{
|
630
|
+
name: 'testing_view',
|
631
|
+
group: '',
|
632
|
+
colour: {},
|
633
|
+
style: '',
|
634
|
+
geometry: {},
|
635
|
+
delay: 0.0,
|
636
|
+
parent: {},
|
637
|
+
lines: [{
|
638
|
+
parent: {colour: {}, style: ''},
|
639
|
+
colour: {},
|
640
|
+
style: [],
|
641
|
+
streams: [{
|
642
|
+
parent: {colour: {}, style: []},
|
643
|
+
colour: {},
|
644
|
+
style: [],
|
645
|
+
width: 80,
|
646
|
+
align: :right,
|
647
|
+
text: 'This is aligned right, and padded with spaces.'
|
648
|
+
}]
|
649
|
+
}]
|
650
|
+
}] }
|
651
|
+
)
|
652
|
+
end
|
653
653
|
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
654
|
+
it 'handles multiple colour and text statements correctly' do
|
655
|
+
Vedeu.view 'testing_view' do
|
656
|
+
line do
|
657
|
+
foreground('#ffff00') { text "\u{25B2}" }
|
658
|
+
text " Prev"
|
659
659
|
|
660
|
-
|
661
|
-
|
660
|
+
foreground('#ffff00') { text "\u{25BC}" }
|
661
|
+
text " Next"
|
662
662
|
|
663
|
-
|
664
|
-
|
663
|
+
foreground('#ffff00') { text "\u{21B2}" }
|
664
|
+
text " Select"
|
665
665
|
|
666
|
-
|
667
|
-
|
666
|
+
foreground('#ffff00') { text "\u{2395}" }
|
667
|
+
text " Pause"
|
668
668
|
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
669
|
+
foreground('#ffff00') { text "Q" }
|
670
|
+
text " Quit"
|
671
|
+
end
|
672
|
+
end.must_equal(
|
673
|
+
{ interfaces: [{
|
674
|
+
name: 'testing_view',
|
675
|
+
group: '',
|
676
|
+
colour: {},
|
677
|
+
style: '',
|
678
|
+
geometry: {},
|
679
|
+
delay: 0.0,
|
680
|
+
parent: {},
|
681
|
+
lines: [
|
682
|
+
{
|
683
|
+
parent: {colour: {}, style: ''},
|
684
|
+
colour: {},
|
685
|
+
style: [],
|
686
|
+
streams: [
|
687
|
+
{
|
688
|
+
colour: {
|
689
|
+
foreground: '#ffff00'
|
690
|
+
},
|
691
|
+
style: [],
|
692
|
+
text: "▲",
|
693
|
+
width: nil,
|
694
|
+
align: :left,
|
695
|
+
parent: {colour: {}, style: []},
|
696
|
+
}, {
|
697
|
+
text: " Prev",
|
698
|
+
}, {
|
699
|
+
colour: {
|
700
|
+
foreground: '#ffff00'
|
701
|
+
},
|
702
|
+
style: [],
|
703
|
+
text: "▼",
|
704
|
+
width: nil,
|
705
|
+
align: :left,
|
706
|
+
parent: {colour: {}, style: []},
|
707
|
+
}, {
|
708
|
+
text: " Next",
|
709
|
+
}, {
|
710
|
+
colour: {
|
711
|
+
foreground: '#ffff00'
|
712
|
+
},
|
713
|
+
style: [],
|
714
|
+
text: "↲",
|
715
|
+
width: nil,
|
716
|
+
align: :left,
|
717
|
+
parent: {colour: {}, style: []},
|
718
|
+
}, {
|
719
|
+
text: " Select",
|
720
|
+
}, {
|
721
|
+
colour: {
|
722
|
+
foreground: '#ffff00'
|
723
|
+
},
|
724
|
+
style: [],
|
725
|
+
text: "⎕",
|
726
|
+
width: nil,
|
727
|
+
align: :left,
|
728
|
+
parent: {colour: {}, style: []},
|
729
|
+
}, {
|
730
|
+
text: " Pause",
|
731
|
+
}, {
|
732
|
+
colour: {
|
733
|
+
foreground: '#ffff00'
|
734
|
+
},
|
735
|
+
style: [],
|
736
|
+
text: "Q",
|
737
|
+
width: nil,
|
738
|
+
align: :left,
|
739
|
+
parent: {colour: {}, style: []},
|
740
|
+
}, {
|
741
|
+
text: " Quit",
|
742
|
+
}
|
743
|
+
]
|
744
|
+
}
|
745
|
+
]
|
746
|
+
}] }
|
747
|
+
)
|
748
|
+
end
|
749
749
|
|
750
|
-
|
751
|
-
|
752
|
-
#
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
#
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
750
|
+
it 'allows inline values for line' do
|
751
|
+
Vedeu.interface 'helium' do
|
752
|
+
# ...
|
753
|
+
end
|
754
|
+
|
755
|
+
attributes = Vedeu.view 'helium' do
|
756
|
+
line 'A headline, if you will.'
|
757
|
+
line # with a spacer line
|
758
|
+
line 'This is a line of text...'
|
759
|
+
line do
|
760
|
+
text '...we can mix and match...'
|
761
|
+
end
|
762
|
+
line '...to our hearts content.'
|
763
|
+
end
|
764
|
+
attributes[:interfaces].first[:lines].size.must_equal(5)
|
765
|
+
end
|
766
|
+
end
|
767
|
+
end
|
768
|
+
end
|
769
|
+
end
|