writeexcel 1.0.4 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +8 -0
- data/README.rdoc +9 -1
- data/examples/a_simple.rb +0 -1
- data/examples/chart_area.rb +0 -1
- data/examples/chart_legend.rb +0 -1
- data/examples/copyformat.rb +0 -1
- data/examples/data_validate.rb +1 -2
- data/examples/date_time.rb +0 -1
- data/examples/demo.rb +0 -1
- data/examples/diag_border.rb +0 -1
- data/examples/formats.rb +0 -1
- data/examples/header.rb +0 -1
- data/examples/hide_sheet.rb +0 -1
- data/examples/hyperlink.rb +0 -1
- data/examples/hyperlink2.rb +0 -1
- data/examples/images.rb +0 -1
- data/examples/merge1.rb +0 -1
- data/examples/merge2.rb +0 -1
- data/examples/merge3.rb +0 -1
- data/examples/merge4.rb +0 -1
- data/examples/merge5.rb +0 -1
- data/examples/password_protection.rb +0 -1
- data/examples/properties.rb +0 -1
- data/examples/properties_jp.rb +0 -1
- data/examples/protection.rb +0 -1
- data/examples/regions.rb +0 -1
- data/examples/repeat.rb +0 -1
- data/examples/set_first_sheet.rb +0 -1
- data/examples/stocks.rb +0 -1
- data/examples/store_formula.rb +0 -1
- data/examples/tab_colors.rb +0 -1
- data/examples/write_arrays.rb +0 -1
- data/lib/writeexcel/biffwriter.rb +2 -1
- data/lib/writeexcel/chart.rb +2 -3
- data/lib/writeexcel/charts/area.rb +1 -1
- data/lib/writeexcel/charts/pie.rb +1 -1
- data/lib/writeexcel/charts/scatter.rb +1 -1
- data/lib/writeexcel/charts/stock.rb +1 -1
- data/lib/writeexcel/col_info.rb +2 -2
- data/lib/writeexcel/comments.rb +1 -1
- data/lib/writeexcel/convert_date_time.rb +7 -7
- data/lib/writeexcel/excelformulaparser.rb +49 -49
- data/lib/writeexcel/format.rb +1 -1
- data/lib/writeexcel/formula.rb +2 -6
- data/lib/writeexcel/helper.rb +3 -3
- data/lib/writeexcel/properties.rb +1 -1
- data/lib/writeexcel/shared_string_table.rb +5 -5
- data/lib/writeexcel/storage_lite.rb +2 -9
- data/lib/writeexcel/version.rb +1 -1
- data/lib/writeexcel/workbook.rb +13 -14
- data/lib/writeexcel/worksheet.rb +43 -35
- data/test/helper.rb +12 -5
- data/test/test_00_IEEE_double.rb +1 -1
- data/test/test_04_dimensions.rb +2 -2
- data/test/test_05_rows.rb +1 -1
- data/test/test_06_extsst.rb +1 -1
- data/test/test_11_date_time.rb +1 -1
- data/test/test_12_date_only.rb +1 -1
- data/test/test_13_date_seconds.rb +1 -1
- data/test/test_21_escher.rb +1 -1
- data/test/test_22_mso_drawing_group.rb +1 -1
- data/test/test_23_note.rb +1 -1
- data/test/test_24_txo.rb +1 -1
- data/test/test_25_position_object.rb +1 -1
- data/test/test_26_autofilter.rb +1 -1
- data/test/test_27_autofilter.rb +1 -1
- data/test/test_28_autofilter.rb +1 -1
- data/test/test_29_process_jpg.rb +1 -43
- data/test/test_30_validation_dval.rb +1 -1
- data/test/test_31_validation_dv_strings.rb +1 -1
- data/test/test_32_validation_dv_formula.rb +1 -1
- data/test/test_40_property_types.rb +1 -1
- data/test/test_41_properties.rb +1 -1
- data/test/test_42_set_properties.rb +2 -2
- data/test/test_50_name_stored.rb +1 -9
- data/test/test_51_name_print_area.rb +3 -13
- data/test/test_52_name_print_titles.rb +3 -21
- data/test/test_53_autofilter.rb +1 -5
- data/test/test_60_chart_generic.rb +3 -3
- data/test/test_61_chart_subclasses.rb +2 -1
- data/test/test_62_chart_formats.rb +9 -21
- data/test/test_63_chart_area_formats.rb +1 -1
- data/test/test_compatibility.rb +1 -1
- data/test/test_example_match.rb +835 -835
- data/test/test_format.rb +1 -114
- data/test/test_formula.rb +1 -1
- data/test/test_properties.rb +1 -2
- data/test/test_storage_lite.rb +2 -2
- data/test/test_workbook.rb +1 -66
- data/test/test_worksheet.rb +1 -18
- data/test/test_write_formula_does_not_change_formula_string.rb +1 -1
- data/writeexcel.gemspec +4 -1
- metadata +38 -19
- data/test/test_01_add_worksheet.rb +0 -43
- data/test/test_02_merge_formats.rb +0 -49
- data/test/test_biff.rb +0 -71
- data/test/test_big_workbook.rb +0 -17
- data/test/test_ole.rb +0 -102
@@ -13,7 +13,7 @@
|
|
13
13
|
require 'helper'
|
14
14
|
require 'stringio'
|
15
15
|
|
16
|
-
class TC_Name_Print_Area < Test
|
16
|
+
class TC_Name_Print_Area < Minitest::Test
|
17
17
|
def setup
|
18
18
|
@test_file = StringIO.new
|
19
19
|
@workbook = WriteExcel.new(@test_file)
|
@@ -34,7 +34,6 @@ class TC_Name_Print_Area < Test::Unit::TestCase
|
|
34
34
|
17 00 08 00 01 00 00 00 00 00 00 00
|
35
35
|
).join('')].pack('H*')
|
36
36
|
|
37
|
-
caption = " \tExternsheet"
|
38
37
|
result = _unpack_externsheet(@workbook.data)
|
39
38
|
target = _unpack_externsheet(target)
|
40
39
|
assert_equal(target, result)
|
@@ -48,7 +47,6 @@ class TC_Name_Print_Area < Test::Unit::TestCase
|
|
48
47
|
00 00 00 06 3B 00 00 00 00 0B 00 00 00 01 00
|
49
48
|
).join('')].pack('H*')
|
50
49
|
|
51
|
-
caption = " \t+ Name ( Sheet1!#{area} )";
|
52
50
|
result = _unpack_name(@workbook.data)
|
53
51
|
target = _unpack_name(target)
|
54
52
|
assert_equal(target, result)
|
@@ -102,7 +100,6 @@ class TC_Name_Print_Area < Test::Unit::TestCase
|
|
102
100
|
17 00 08 00 01 00 00 00 00 00 00 00
|
103
101
|
).join('')].pack('H*')
|
104
102
|
|
105
|
-
caption = " \tExternsheet"
|
106
103
|
result = _unpack_externsheet(@workbook.data)
|
107
104
|
target = _unpack_externsheet(target)
|
108
105
|
assert_equal(target, result)
|
@@ -116,7 +113,6 @@ class TC_Name_Print_Area < Test::Unit::TestCase
|
|
116
113
|
00 00 00 06 3B 00 00 00 00 FF FF 00 00 00 00
|
117
114
|
).join('')].pack('H*')
|
118
115
|
|
119
|
-
caption = " \t+ Name ( Sheet1!#{area} )";
|
120
116
|
result = _unpack_name(@workbook.data)
|
121
117
|
target = _unpack_name(target)
|
122
118
|
assert_equal(target, result)
|
@@ -136,7 +132,6 @@ class TC_Name_Print_Area < Test::Unit::TestCase
|
|
136
132
|
17 00 08 00 01 00 00 00 00 00 00 00
|
137
133
|
).join('')].pack('H*')
|
138
134
|
|
139
|
-
caption = " \tExternsheet"
|
140
135
|
result = _unpack_externsheet(@workbook.data)
|
141
136
|
target = _unpack_externsheet(target)
|
142
137
|
assert_equal(target, result)
|
@@ -150,7 +145,6 @@ class TC_Name_Print_Area < Test::Unit::TestCase
|
|
150
145
|
00 00 00 06 3B 00 00 00 00 FF FF 00 00 07 00
|
151
146
|
).join('')].pack('H*')
|
152
147
|
|
153
|
-
caption = " \t+ Name ( Sheet1!#{area} )";
|
154
148
|
result = _unpack_name(@workbook.data)
|
155
149
|
target = _unpack_name(target)
|
156
150
|
assert_equal(target, result)
|
@@ -174,7 +168,6 @@ class TC_Name_Print_Area < Test::Unit::TestCase
|
|
174
168
|
01 00 00 00 02 00 02 00
|
175
169
|
).join('')].pack('H*')
|
176
170
|
|
177
|
-
caption = " \tExternsheet"
|
178
171
|
result = _unpack_externsheet(@workbook.data)
|
179
172
|
target = _unpack_externsheet(target)
|
180
173
|
assert_equal(target, result)
|
@@ -194,7 +187,6 @@ class TC_Name_Print_Area < Test::Unit::TestCase
|
|
194
187
|
00 00 00 06 3B 02 00 06 00 07 00 06 00 07 00
|
195
188
|
).join('')].pack('H*')
|
196
189
|
|
197
|
-
caption = " \t+ Name ( Sheet1!A1:B2, Sheet2!D4:E5, Sheet3!G7:H8 )";
|
198
190
|
result = _unpack_name(@workbook.data)
|
199
191
|
target = _unpack_name(target)
|
200
192
|
assert_equal(target, result)
|
@@ -202,9 +194,9 @@ class TC_Name_Print_Area < Test::Unit::TestCase
|
|
202
194
|
|
203
195
|
def test_ranges_on_multiple_sheets_with_sheets_spaced_out
|
204
196
|
worksheet1 = @workbook.add_worksheet
|
205
|
-
|
197
|
+
@workbook.add_worksheet
|
206
198
|
worksheet3 = @workbook.add_worksheet
|
207
|
-
|
199
|
+
@workbook.add_worksheet
|
208
200
|
worksheet5 = @workbook.add_worksheet
|
209
201
|
|
210
202
|
worksheet1.print_area('A1:B2')
|
@@ -220,7 +212,6 @@ class TC_Name_Print_Area < Test::Unit::TestCase
|
|
220
212
|
02 00 00 00 04 00 04 00
|
221
213
|
).join('')].pack('H*')
|
222
214
|
|
223
|
-
caption = " \tExternsheet"
|
224
215
|
result = _unpack_externsheet(@workbook.data)
|
225
216
|
target = _unpack_externsheet(target)
|
226
217
|
assert_equal(target, result)
|
@@ -240,7 +231,6 @@ class TC_Name_Print_Area < Test::Unit::TestCase
|
|
240
231
|
00 00 00 06 3B 02 00 06 00 07 00 06 00 07 00
|
241
232
|
).join('')].pack('H*')
|
242
233
|
|
243
|
-
caption = " \t+ Name ( Sheet1!A1:B2, Sheet3!D4:E5, Sheet5!G7:H8 )";
|
244
234
|
result = _unpack_name(@workbook.data)
|
245
235
|
target = _unpack_name(target)
|
246
236
|
assert_equal(target, result)
|
@@ -13,7 +13,7 @@
|
|
13
13
|
require 'helper'
|
14
14
|
require 'stringio'
|
15
15
|
|
16
|
-
class TC_Name_Print_Titles < Test
|
16
|
+
class TC_Name_Print_Titles < Minitest::Test
|
17
17
|
def setup
|
18
18
|
@test_file = StringIO.new
|
19
19
|
@workbook = WriteExcel.new(@test_file)
|
@@ -33,7 +33,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
33
33
|
17 00 08 00 01 00 00 00 00 00 00 00
|
34
34
|
).join('')].pack('H*')
|
35
35
|
|
36
|
-
caption = " \tExternsheet"
|
37
36
|
result = _unpack_externsheet(@workbook.data)
|
38
37
|
target = _unpack_externsheet(target)
|
39
38
|
assert_equal(target, result)
|
@@ -47,7 +46,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
47
46
|
00 00 00 07 3B 00 00 00 00 00 00 00 00 FF 00
|
48
47
|
).join('')].pack('H*')
|
49
48
|
|
50
|
-
caption = " \t+ Name repeats ( Sheet1!1:1 )";
|
51
49
|
result = _unpack_name(@workbook.data)
|
52
50
|
target = _unpack_name(target)
|
53
51
|
assert_equal(target, result)
|
@@ -66,7 +64,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
66
64
|
17 00 08 00 01 00 00 00 00 00 00 00
|
67
65
|
).join('')].pack('H*')
|
68
66
|
|
69
|
-
caption = " \tExternsheet"
|
70
67
|
result = _unpack_externsheet(@workbook.data)
|
71
68
|
target = _unpack_externsheet(target)
|
72
69
|
assert_equal(target, result)
|
@@ -80,7 +77,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
80
77
|
00 00 00 07 3B 00 00 00 00 09 00 00 00 FF 00
|
81
78
|
).join('')].pack('H*')
|
82
79
|
|
83
|
-
caption = " \t+ Name repeats ( Sheet1!1:10 )";
|
84
80
|
result = _unpack_name(@workbook.data)
|
85
81
|
target = _unpack_name(target)
|
86
82
|
assert_equal(target, result)
|
@@ -99,7 +95,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
99
95
|
17 00 08 00 01 00 00 00 00 00 00 00
|
100
96
|
).join('')].pack('H*')
|
101
97
|
|
102
|
-
caption = " \tExternsheet"
|
103
98
|
result = _unpack_externsheet(@workbook.data)
|
104
99
|
target = _unpack_externsheet(target)
|
105
100
|
assert_equal(target, result)
|
@@ -113,7 +108,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
113
108
|
00 00 00 07 3B 00 00 00 00 FF FF 00 00 00 00
|
114
109
|
).join('')].pack('H*')
|
115
110
|
|
116
|
-
caption = " \t+ Name repeats ( Sheet1!A:A )";
|
117
111
|
result = _unpack_name(@workbook.data)
|
118
112
|
target = _unpack_name(target)
|
119
113
|
assert_equal(target, result)
|
@@ -132,7 +126,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
132
126
|
17 00 08 00 01 00 00 00 00 00 00 00
|
133
127
|
).join('')].pack('H*')
|
134
128
|
|
135
|
-
caption = " \tExternsheet"
|
136
129
|
result = _unpack_externsheet(@workbook.data)
|
137
130
|
target = _unpack_externsheet(target)
|
138
131
|
assert_equal(target, result)
|
@@ -146,7 +139,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
146
139
|
00 00 00 07 3B 00 00 00 00 FF FF 00 00 00 00
|
147
140
|
).join('')].pack('H*')
|
148
141
|
|
149
|
-
caption = " \t+ Name repeats ( Sheet1!A:A )";
|
150
142
|
result = _unpack_name(@workbook.data)
|
151
143
|
target = _unpack_name(target)
|
152
144
|
assert_equal(target, result)
|
@@ -165,7 +157,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
165
157
|
17 00 08 00 01 00 00 00 00 00 00 00
|
166
158
|
).join('')].pack('H*')
|
167
159
|
|
168
|
-
caption = " \tExternsheet"
|
169
160
|
result = _unpack_externsheet(@workbook.data)
|
170
161
|
target = _unpack_externsheet(target)
|
171
162
|
assert_equal(target, result)
|
@@ -179,7 +170,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
179
170
|
00 00 00 07 3B 00 00 00 00 FF FF 00 00 09 00
|
180
171
|
).join('')].pack('H*')
|
181
172
|
|
182
|
-
caption = " \t+ Name repeats ( Sheet1!A:J )";
|
183
173
|
result = _unpack_name(@workbook.data)
|
184
174
|
target = _unpack_name(target)
|
185
175
|
assert_equal(target, result)
|
@@ -198,7 +188,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
198
188
|
17 00 08 00 01 00 00 00 00 00 00 00
|
199
189
|
).join('')].pack('H*')
|
200
190
|
|
201
|
-
caption = " \tExternsheet"
|
202
191
|
result = _unpack_externsheet(@workbook.data)
|
203
192
|
target = _unpack_externsheet(target)
|
204
193
|
assert_equal(target, result)
|
@@ -212,7 +201,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
212
201
|
00 00 00 07 3B 00 00 00 00 FF FF 00 00 09 00
|
213
202
|
).join('')].pack('H*')
|
214
203
|
|
215
|
-
caption = " \t+ Name repeats ( Sheet1!A:J )";
|
216
204
|
result = _unpack_name(@workbook.data)
|
217
205
|
target = _unpack_name(target)
|
218
206
|
assert_equal(target, result)
|
@@ -236,7 +224,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
236
224
|
01 00 00 00 02 00 02 00
|
237
225
|
).join('')].pack('H*')
|
238
226
|
|
239
|
-
caption = " \tExternsheet"
|
240
227
|
result = _unpack_externsheet(@workbook.data)
|
241
228
|
target = _unpack_externsheet(target)
|
242
229
|
assert_equal(target, result)
|
@@ -256,7 +243,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
256
243
|
00 00 00 07 3B 02 00 06 00 07 00 00 00 FF 00
|
257
244
|
).join('')].pack('H*')
|
258
245
|
|
259
|
-
caption = " \t+ Name repeats ( Sheet1!1:2, Sheet2!4:5, Sheet3!7:8 )";
|
260
246
|
result = _unpack_name(@workbook.data)
|
261
247
|
target = _unpack_name(target)
|
262
248
|
assert_equal(target, result)
|
@@ -264,9 +250,9 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
264
250
|
|
265
251
|
def test_repeat_rows_on_multiple_sheets_with_sheets_spaced_out
|
266
252
|
worksheet1 = @workbook.add_worksheet
|
267
|
-
|
253
|
+
@workbook.add_worksheet
|
268
254
|
worksheet3 = @workbook.add_worksheet
|
269
|
-
|
255
|
+
@workbook.add_worksheet
|
270
256
|
worksheet5 = @workbook.add_worksheet
|
271
257
|
|
272
258
|
worksheet1.repeat_rows(0, 1)
|
@@ -282,7 +268,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
282
268
|
02 00 00 00 04 00 04 00
|
283
269
|
).join('')].pack('H*')
|
284
270
|
|
285
|
-
caption = " \tExternsheet"
|
286
271
|
result = _unpack_externsheet(@workbook.data)
|
287
272
|
target = _unpack_externsheet(target)
|
288
273
|
assert_equal(target, result)
|
@@ -302,7 +287,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
302
287
|
00 00 00 07 3B 02 00 06 00 07 00 00 00 FF 00
|
303
288
|
).join('')].pack('H*')
|
304
289
|
|
305
|
-
caption = " \t+ Name repeats ( Sheet1!1:2, Sheet3!4:5, Sheet5!7:8 )";
|
306
290
|
result = _unpack_name(@workbook.data)
|
307
291
|
target = _unpack_name(target)
|
308
292
|
assert_equal(target, result)
|
@@ -322,7 +306,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
322
306
|
17 00 08 00 01 00 00 00 00 00 00 00
|
323
307
|
).join('')].pack('H*')
|
324
308
|
|
325
|
-
caption = " \tExternsheet"
|
326
309
|
result = _unpack_externsheet(@workbook.data)
|
327
310
|
target = _unpack_externsheet(target)
|
328
311
|
assert_equal(target, result)
|
@@ -337,7 +320,6 @@ class TC_Name_Print_Titles < Test::Unit::TestCase
|
|
337
320
|
04 00 3B 00 00 01 00 02 00 00 00 FF 00 10
|
338
321
|
).join('')].pack('H*')
|
339
322
|
|
340
|
-
caption = " \t+ Name repeats ( Sheet1!2:3, Sheet1!D:E )";
|
341
323
|
result = _unpack_name(@workbook.data)
|
342
324
|
target = _unpack_name(target)
|
343
325
|
assert_equal(target, result)
|
data/test/test_53_autofilter.rb
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
require 'helper'
|
14
14
|
require 'stringio'
|
15
15
|
|
16
|
-
class TC_autofilter < Test
|
16
|
+
class TC_autofilter < Minitest::Test
|
17
17
|
def setup
|
18
18
|
@test_file = StringIO.new
|
19
19
|
@workbook = WriteExcel.new(@test_file)
|
@@ -33,7 +33,6 @@ class TC_autofilter < Test::Unit::TestCase
|
|
33
33
|
17 00 08 00 01 00 00 00 00 00 00 00
|
34
34
|
).join('')].pack('H*')
|
35
35
|
|
36
|
-
caption = " \tExternsheet"
|
37
36
|
result = _unpack_externsheet(@workbook.data)
|
38
37
|
target = _unpack_externsheet(target)
|
39
38
|
assert_equal(target, result)
|
@@ -47,7 +46,6 @@ class TC_autofilter < Test::Unit::TestCase
|
|
47
46
|
00 00 00 0D 3B 00 00 00 00 04 00 00 00 02 00
|
48
47
|
).join('')].pack('H*')
|
49
48
|
|
50
|
-
caption = " \t+ Name = autofilter ( Sheet1!A1:C5 )";
|
51
49
|
result = _unpack_name(@workbook.data)
|
52
50
|
target = _unpack_name(target)
|
53
51
|
assert_equal(target, result)
|
@@ -69,7 +67,6 @@ class TC_autofilter < Test::Unit::TestCase
|
|
69
67
|
01 00
|
70
68
|
).join('')].pack('H*')
|
71
69
|
|
72
|
-
caption = " \tExternsheet"
|
73
70
|
result = _unpack_externsheet(@workbook.data)
|
74
71
|
target = _unpack_externsheet(target)
|
75
72
|
assert_equal(target, result)
|
@@ -86,7 +83,6 @@ class TC_autofilter < Test::Unit::TestCase
|
|
86
83
|
00 00 00 0D 3B 01 00 00 00 04 00 00 00 02 00
|
87
84
|
).join('')].pack('H*')
|
88
85
|
|
89
|
-
caption = " \t+ Name = autofilter ( Sheet1!A1:C5, Sheet2!A1:C5 )";
|
90
86
|
result = _unpack_name(@workbook.data)
|
91
87
|
target = _unpack_name(target)
|
92
88
|
assert_equal(target, result)
|
@@ -13,7 +13,7 @@ require 'stringio'
|
|
13
13
|
# original written in Perl by John McNamara
|
14
14
|
# converted to Ruby by Hideo Nakamura, cxn03651@msj.biglobe.ne.jp
|
15
15
|
#
|
16
|
-
class TC_ChartGeneric < Test
|
16
|
+
class TC_ChartGeneric < Minitest::Test
|
17
17
|
def setup
|
18
18
|
io = StringIO.new
|
19
19
|
workbook = WriteExcel.new(io)
|
@@ -52,7 +52,7 @@ class TC_ChartGeneric < Test::Unit::TestCase
|
|
52
52
|
values = [0x0000, 0x0000, 0x02DD51E0, 0x01C2B838]
|
53
53
|
got = unpack_record(@chart.__send__("store_chart", *values))
|
54
54
|
assert_equal(expected, got, caption)
|
55
|
-
|
55
|
+
end
|
56
56
|
|
57
57
|
###############################################################################
|
58
58
|
#
|
@@ -65,7 +65,7 @@ class TC_ChartGeneric < Test::Unit::TestCase
|
|
65
65
|
).join(' ')
|
66
66
|
got = unpack_record(@chart.__send__("store_series", 8, 8))
|
67
67
|
assert_equal(expected, got, caption)
|
68
|
-
|
68
|
+
end
|
69
69
|
|
70
70
|
###############################################################################
|
71
71
|
#
|
@@ -13,7 +13,8 @@ require 'stringio'
|
|
13
13
|
# original written in Perl by John McNamara
|
14
14
|
# converted to Ruby by Hideo Nakamura, cxn03651@msj.biglobe.ne.jp
|
15
15
|
#
|
16
|
-
class TC_chart_subclasses < Test
|
16
|
+
class TC_chart_subclasses < Minitest::Test
|
17
|
+
|
17
18
|
def setup
|
18
19
|
io = StringIO.new
|
19
20
|
@workbook = WriteExcel.new(io)
|
@@ -13,7 +13,7 @@ require 'stringio'
|
|
13
13
|
# original written in Perl by John McNamara
|
14
14
|
# converted to Ruby by Hideo Nakamura, cxn03651@msj.biglobe.ne.jp
|
15
15
|
#
|
16
|
-
class TC_ChartFormats < Test
|
16
|
+
class TC_ChartFormats < Minitest::Test
|
17
17
|
def setup
|
18
18
|
@io = StringIO.new
|
19
19
|
@workbook = WriteExcel.new(@io)
|
@@ -90,25 +90,19 @@ class TC_ChartFormats < Test::Unit::TestCase
|
|
90
90
|
caption1 = " \tChart: index = get_color_indices(#{color})"
|
91
91
|
caption2 = " \tChart: rgb = get_color_indices(#{color})"
|
92
92
|
|
93
|
-
expected_index = nil
|
94
|
-
expected_rgb = nil
|
95
|
-
|
96
93
|
got_index, got_rgb = @chart.__send__("get_color_indices", color)
|
97
94
|
|
98
|
-
|
99
|
-
|
95
|
+
assert_nil(got_index, caption1)
|
96
|
+
assert_nil(got_rgb, caption2)
|
100
97
|
|
101
98
|
color = 64
|
102
99
|
caption1 = " \tChart: index = get_color_indices(#{color})"
|
103
100
|
caption2 = " \tChart: rgb = get_color_indices(#{color})"
|
104
101
|
|
105
|
-
expected_index = nil
|
106
|
-
expected_rgb = nil
|
107
|
-
|
108
102
|
got_index, got_rgb = @chart.__send__("get_color_indices", color)
|
109
103
|
|
110
|
-
|
111
|
-
|
104
|
+
assert_nil(got_index, caption1)
|
105
|
+
assert_nil(got_rgb, caption2)
|
112
106
|
end
|
113
107
|
|
114
108
|
###############################################################################
|
@@ -120,13 +114,10 @@ class TC_ChartFormats < Test::Unit::TestCase
|
|
120
114
|
caption1 = " \tChart: index = get_color_indices(#{color})"
|
121
115
|
caption2 = " \tChart: rgb = get_color_indices(#{color})"
|
122
116
|
|
123
|
-
expected_index = nil
|
124
|
-
expected_rgb = nil
|
125
|
-
|
126
117
|
got_index, got_rgb = @chart.__send__("get_color_indices", color)
|
127
118
|
|
128
|
-
|
129
|
-
|
119
|
+
assert_nil(got_index, caption1)
|
120
|
+
assert_nil(got_rgb, caption2)
|
130
121
|
end
|
131
122
|
|
132
123
|
###############################################################################
|
@@ -138,13 +129,10 @@ class TC_ChartFormats < Test::Unit::TestCase
|
|
138
129
|
caption1 = " \tChart: index = get_color_indices(#{color})"
|
139
130
|
caption2 = " \tChart: rgb = get_color_indices(#{color})"
|
140
131
|
|
141
|
-
expected_index = nil
|
142
|
-
expected_rgb = nil
|
143
|
-
|
144
132
|
got_index, got_rgb = @chart.__send__("get_color_indices", color)
|
145
133
|
|
146
|
-
|
147
|
-
|
134
|
+
assert_nil(got_index, caption1)
|
135
|
+
assert_nil(got_rgb, caption2)
|
148
136
|
end
|
149
137
|
|
150
138
|
###############################################################################
|
@@ -13,7 +13,7 @@ require 'stringio'
|
|
13
13
|
# original written in Perl by John McNamara
|
14
14
|
# converted to Ruby by Hideo Nakamura, cxn03651@msj.biglobe.ne.jp
|
15
15
|
#
|
16
|
-
class TC_ChartAreaFormats < Test
|
16
|
+
class TC_ChartAreaFormats < Minitest::Test
|
17
17
|
def setup
|
18
18
|
@io = StringIO.new
|
19
19
|
@workbook = WriteExcel.new(@io)
|