writeexcel 1.0.5 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/test-suite.yml +26 -0
- data/README.rdoc +11 -2
- data/lib/writeexcel/biffwriter.rb +2 -1
- data/lib/writeexcel/cell_range.rb +1 -0
- 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 +2 -1
- data/lib/writeexcel/convert_date_time.rb +7 -7
- data/lib/writeexcel/excelformulaparser.rb +50 -50
- data/lib/writeexcel/format.rb +1 -1
- data/lib/writeexcel/formula.rb +1 -1
- 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 +2 -4
- data/lib/writeexcel/workbook.rb +14 -25
- data/lib/writeexcel/worksheet.rb +73 -56
- data/lib/writeexcel/worksheets.rb +1 -2
- data/lib/writeexcel.rb +3 -5
- data/test/helper.rb +12 -4
- data/test/test_00_IEEE_double.rb +1 -1
- data/test/test_04_dimensions.rb +6 -6
- data/test/test_05_rows.rb +14 -17
- data/test/test_06_extsst.rb +8 -11
- 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 +5 -5
- data/test/test_22_mso_drawing_group.rb +37 -40
- data/test/test_23_note.rb +5 -5
- data/test/test_24_txo.rb +5 -5
- data/test/test_25_position_object.rb +5 -5
- 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 +5 -5
- data/test/test_31_validation_dv_strings.rb +8 -8
- data/test/test_32_validation_dv_formula.rb +5 -5
- data/test/test_40_property_types.rb +1 -1
- data/test/test_41_properties.rb +1 -1
- data/test/test_42_set_properties.rb +30 -37
- data/test/test_50_name_stored.rb +1 -19
- 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 +6 -3
- metadata +24 -21
- 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
data/test/test_05_rows.rb
CHANGED
@@ -14,31 +14,28 @@
|
|
14
14
|
require 'helper'
|
15
15
|
require 'stringio'
|
16
16
|
|
17
|
-
class TC_rows < Test
|
17
|
+
class TC_rows < Minitest::Test
|
18
18
|
|
19
19
|
def setup
|
20
20
|
end
|
21
21
|
|
22
22
|
def teardown
|
23
|
-
if @workbook.instance_variable_get(
|
24
|
-
@workbook.instance_variable_get(
|
25
|
-
end
|
26
|
-
if @worksheet.instance_variable_get(:@filehandle)
|
27
|
-
@worksheet.instance_variable_get(:@filehandle).close(true)
|
23
|
+
if @workbook.instance_variable_get("@filehandle")
|
24
|
+
@workbook.instance_variable_get("@filehandle").close(true)
|
28
25
|
end
|
29
26
|
end
|
30
27
|
|
31
28
|
def test_1
|
32
29
|
file = StringIO.new
|
33
|
-
workbook = WriteExcel.new(file)
|
34
|
-
workbook.compatibility_mode(1)
|
30
|
+
@workbook = WriteExcel.new(file)
|
31
|
+
@workbook.compatibility_mode(1)
|
35
32
|
@tests = []
|
36
33
|
|
37
34
|
# for test case 1
|
38
35
|
row = 1
|
39
36
|
col1 = 0
|
40
37
|
col2 = 0
|
41
|
-
worksheet = workbook.add_worksheet
|
38
|
+
worksheet = @workbook.add_worksheet
|
42
39
|
worksheet.set_row(row, 15)
|
43
40
|
@tests.push(
|
44
41
|
[
|
@@ -54,7 +51,7 @@ class TC_rows < Test::Unit::TestCase
|
|
54
51
|
row = 2
|
55
52
|
col1 = 0
|
56
53
|
col2 = 0
|
57
|
-
worksheet = workbook.add_worksheet
|
54
|
+
worksheet = @workbook.add_worksheet
|
58
55
|
worksheet.write(row, col1, 'Test')
|
59
56
|
worksheet.write(row, col2, 'Test')
|
60
57
|
@tests.push(
|
@@ -72,7 +69,7 @@ class TC_rows < Test::Unit::TestCase
|
|
72
69
|
row = 3
|
73
70
|
col1 = 0
|
74
71
|
col2 = 1
|
75
|
-
worksheet = workbook.add_worksheet
|
72
|
+
worksheet = @workbook.add_worksheet
|
76
73
|
worksheet.write(row, col1, 'Test')
|
77
74
|
worksheet.write(row, col2, 'Test')
|
78
75
|
@tests.push(
|
@@ -89,7 +86,7 @@ class TC_rows < Test::Unit::TestCase
|
|
89
86
|
row = 4
|
90
87
|
col1 = 1
|
91
88
|
col2 = 1
|
92
|
-
worksheet = workbook.add_worksheet
|
89
|
+
worksheet = @workbook.add_worksheet
|
93
90
|
worksheet.write(row, col1, 'Test')
|
94
91
|
worksheet.write(row, col2, 'Test')
|
95
92
|
@tests.push(
|
@@ -106,7 +103,7 @@ class TC_rows < Test::Unit::TestCase
|
|
106
103
|
row = 5
|
107
104
|
col1 = 1
|
108
105
|
col2 = 255
|
109
|
-
worksheet = workbook.add_worksheet
|
106
|
+
worksheet = @workbook.add_worksheet
|
110
107
|
worksheet.write(row, col1, 'Test')
|
111
108
|
worksheet.write(row, col2, 'Test')
|
112
109
|
@tests.push(
|
@@ -123,7 +120,7 @@ class TC_rows < Test::Unit::TestCase
|
|
123
120
|
row = 6
|
124
121
|
col1 = 255
|
125
122
|
col2 = 255
|
126
|
-
worksheet = workbook.add_worksheet
|
123
|
+
worksheet = @workbook.add_worksheet
|
127
124
|
worksheet.write(row, col1, 'Test')
|
128
125
|
worksheet.write(row, col2, 'Test')
|
129
126
|
@tests.push(
|
@@ -140,7 +137,7 @@ class TC_rows < Test::Unit::TestCase
|
|
140
137
|
row = 7
|
141
138
|
col1 = 2
|
142
139
|
col2 = 9
|
143
|
-
worksheet = workbook.add_worksheet
|
140
|
+
worksheet = @workbook.add_worksheet
|
144
141
|
worksheet.set_row(row, 15)
|
145
142
|
worksheet.write(row, col1, 'Test')
|
146
143
|
worksheet.write(row, col2, 'Test')
|
@@ -154,8 +151,8 @@ class TC_rows < Test::Unit::TestCase
|
|
154
151
|
]
|
155
152
|
)
|
156
153
|
|
157
|
-
workbook.biff_only = 1
|
158
|
-
workbook.close
|
154
|
+
@workbook.biff_only = 1
|
155
|
+
@workbook.close
|
159
156
|
# Read in the row records
|
160
157
|
rows = []
|
161
158
|
|
data/test/test_06_extsst.rb
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
require 'helper'
|
19
19
|
require 'stringio'
|
20
20
|
|
21
|
-
class TC_extsst < Test
|
21
|
+
class TC_extsst < Minitest::Test
|
22
22
|
|
23
23
|
def setup
|
24
24
|
@tests = [
|
@@ -56,27 +56,24 @@ class TC_extsst < Test::Unit::TestCase
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def teardown
|
59
|
-
if @workbook.instance_variable_get(
|
60
|
-
@workbook.instance_variable_get(
|
61
|
-
end
|
62
|
-
if @worksheet.instance_variable_get(:@filehandle)
|
63
|
-
@worksheet.instance_variable_get(:@filehandle).close(true)
|
59
|
+
if @workbook.instance_variable_get("@filehandle")
|
60
|
+
@workbook.instance_variable_get("@filehandle").close(true)
|
64
61
|
end
|
65
62
|
end
|
66
63
|
|
67
64
|
def test_to_tests
|
68
65
|
@tests.each do |test|
|
69
66
|
io = StringIO.new
|
70
|
-
workbook = WriteExcel.new(io)
|
71
|
-
workbook.not_using_tmpfile
|
67
|
+
@workbook = WriteExcel.new(io)
|
68
|
+
@workbook.not_using_tmpfile
|
72
69
|
|
73
70
|
str_unique = test[0]
|
74
71
|
|
75
|
-
workbook.__send__("calculate_extsst_size", str_unique)
|
72
|
+
@workbook.__send__("calculate_extsst_size", str_unique)
|
76
73
|
|
77
|
-
assert_equal(test[1], workbook.extsst_buckets,
|
74
|
+
assert_equal(test[1], @workbook.extsst_buckets,
|
78
75
|
" \tBucket number for #{str_unique} strings")
|
79
|
-
assert_equal(test[2], workbook.extsst_bucket_size,
|
76
|
+
assert_equal(test[2], @workbook.extsst_bucket_size,
|
80
77
|
" \tBucket size for #{str_unique} strings")
|
81
78
|
end
|
82
79
|
end
|
data/test/test_11_date_time.rb
CHANGED
data/test/test_12_date_only.rb
CHANGED
data/test/test_21_escher.rb
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
require 'helper'
|
23
23
|
require 'stringio'
|
24
24
|
|
25
|
-
class TC_escher < Test
|
25
|
+
class TC_escher < Minitest::Test
|
26
26
|
|
27
27
|
def setup
|
28
28
|
@workbook = WriteExcel.new(StringIO.new)
|
@@ -30,11 +30,11 @@ class TC_escher < Test::Unit::TestCase
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def teardown
|
33
|
-
if @workbook.instance_variable_get(
|
34
|
-
@workbook.instance_variable_get(
|
33
|
+
if @workbook.instance_variable_get("@filehandle")
|
34
|
+
@workbook.instance_variable_get("@filehandle").close(true)
|
35
35
|
end
|
36
|
-
if @worksheet.instance_variable_get(
|
37
|
-
@worksheet.instance_variable_get(
|
36
|
+
if @worksheet.instance_variable_get("@filehandle")
|
37
|
+
@worksheet.instance_variable_get("@filehandle").close(true)
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
@@ -19,7 +19,7 @@
|
|
19
19
|
require 'helper'
|
20
20
|
require 'stringio'
|
21
21
|
|
22
|
-
class TC_mso_drawing_group < Test
|
22
|
+
class TC_mso_drawing_group < Minitest::Test
|
23
23
|
|
24
24
|
def test_dummy
|
25
25
|
assert(true)
|
@@ -33,11 +33,8 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def teardown
|
36
|
-
if @workbook.instance_variable_get(
|
37
|
-
@workbook.instance_variable_get(
|
38
|
-
end
|
39
|
-
if @worksheet.instance_variable_get(:@filehandle)
|
40
|
-
@worksheet.instance_variable_get(:@filehandle).close(true)
|
36
|
+
if @workbook.instance_variable_get("@filehandle")
|
37
|
+
@workbook.instance_variable_get("@filehandle").close(true)
|
41
38
|
end
|
42
39
|
end
|
43
40
|
|
@@ -49,7 +46,7 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
49
46
|
end
|
50
47
|
@workbook.calc_mso_sizes
|
51
48
|
|
52
|
-
caption = sprintf(" \tSheet1: %4d comments.", count)
|
49
|
+
#caption = sprintf(" \tSheet1: %4d comments.", count)
|
53
50
|
target = %w(
|
54
51
|
EB 00 5A 00 0F 00 00 F0 52 00 00 00 00 00 06 F0
|
55
52
|
18 00 00 00 02 04 00 00 02 00 00 00 02 00 00 00
|
@@ -63,7 +60,7 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
63
60
|
|
64
61
|
|
65
62
|
# Test the parameters pass to the worksheets
|
66
|
-
caption += ' (params)'
|
63
|
+
#caption += ' (params)'
|
67
64
|
result_ids = []
|
68
65
|
target_ids = [
|
69
66
|
1024, 1, 2, 1025,
|
@@ -92,13 +89,13 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
92
89
|
C0 01 40 00 00 08 40 00 1E F1 10 00 00 00 0D 00
|
93
90
|
00 08 0C 00 00 08 17 00 00 08 F7 00 00 10
|
94
91
|
).join(' ')
|
95
|
-
caption = sprintf( " \tSheet1: %4d comments.", count)
|
92
|
+
#caption = sprintf( " \tSheet1: %4d comments.", count)
|
96
93
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
97
94
|
assert_equal(target, result, caption)
|
98
95
|
|
99
96
|
|
100
97
|
# Test the parameters pass to the worksheets
|
101
|
-
caption += ' (params)'
|
98
|
+
#caption += ' (params)'
|
102
99
|
result_ids = []
|
103
100
|
target_ids = [
|
104
101
|
1024, 1, 3, 1026,
|
@@ -126,13 +123,13 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
126
123
|
C0 01 40 00 00 08 40 00 1E F1 10 00 00 00 0D 00
|
127
124
|
00 08 0C 00 00 08 17 00 00 08 F7 00 00 10
|
128
125
|
).join(' ')
|
129
|
-
caption = sprintf( " \tSheet1: %4d comments.", count)
|
126
|
+
#caption = sprintf( " \tSheet1: %4d comments.", count)
|
130
127
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
131
128
|
assert_equal(target, result, caption)
|
132
129
|
|
133
130
|
|
134
131
|
# Test the parameters pass to the worksheets
|
135
|
-
caption += ' (params)'
|
132
|
+
#caption += ' (params)'
|
136
133
|
result_ids = []
|
137
134
|
target_ids = [
|
138
135
|
1024, 1, 4, 1027
|
@@ -160,13 +157,13 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
160
157
|
C0 01 40 00 00 08 40 00 1E F1 10 00 00 00 0D 00
|
161
158
|
00 08 0C 00 00 08 17 00 00 08 F7 00 00 10
|
162
159
|
).join(' ')
|
163
|
-
caption = sprintf( " \tSheet1: %4d comments.", count)
|
160
|
+
#caption = sprintf( " \tSheet1: %4d comments.", count)
|
164
161
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
165
162
|
assert_equal(target, result, caption)
|
166
163
|
|
167
164
|
|
168
165
|
# Test the parameters pass to the worksheets
|
169
|
-
caption += ' (params)'
|
166
|
+
#caption += ' (params)'
|
170
167
|
result_ids = []
|
171
168
|
target_ids = [
|
172
169
|
1024, 1, 1024, 2047
|
@@ -195,13 +192,13 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
195
192
|
1E F1 10 00 00 00 0D 00 00 08 0C 00 00 08 17 00
|
196
193
|
00 08 F7 00 00 10
|
197
194
|
).join(' ')
|
198
|
-
caption = sprintf( " \tSheet1: %4d comments.", count)
|
195
|
+
#caption = sprintf( " \tSheet1: %4d comments.", count)
|
199
196
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
200
197
|
assert_equal(target, result, caption)
|
201
198
|
|
202
199
|
|
203
200
|
# Test the parameters pass to the worksheets
|
204
|
-
caption += ' (params)'
|
201
|
+
#caption += ' (params)'
|
205
202
|
result_ids = []
|
206
203
|
target_ids = [
|
207
204
|
1024, 1, 1025, 2048
|
@@ -230,13 +227,13 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
230
227
|
C0 01 40 00 00 08 40 00 1E F1 10 00 00 00 0D 00
|
231
228
|
00 08 0C 00 00 08 17 00 00 08 F7 00 00 10
|
232
229
|
).join(' ')
|
233
|
-
caption = sprintf( " \tSheet1: %4d comments.", count)
|
230
|
+
#caption = sprintf( " \tSheet1: %4d comments.", count)
|
234
231
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
235
232
|
assert_equal(target, result, caption)
|
236
233
|
|
237
234
|
|
238
235
|
# Test the parameters pass to the worksheets
|
239
|
-
caption += ' (params)'
|
236
|
+
#caption += ' (params)'
|
240
237
|
result_ids = []
|
241
238
|
target_ids = [
|
242
239
|
1024, 1, 2049, 3072
|
@@ -269,14 +266,14 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
269
266
|
1E F1 10 00 00 00 0D 00 00 08 0C 00 00 08 17 00
|
270
267
|
00 08 F7 00 00 10
|
271
268
|
).join(' ')
|
272
|
-
caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments..",
|
269
|
+
#caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments..",
|
273
270
|
count1, count2)
|
274
271
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
275
272
|
assert_equal(target, result, caption)
|
276
273
|
|
277
274
|
|
278
275
|
# Test the parameters pass to the worksheets
|
279
|
-
caption += ' (params)'
|
276
|
+
#caption += ' (params)'
|
280
277
|
result_ids = []
|
281
278
|
target_ids = [
|
282
279
|
1024, 1, 2, 1025,
|
@@ -310,14 +307,14 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
310
307
|
1E F1 10 00 00 00 0D 00 00 08 0C 00 00 08 17 00
|
311
308
|
00 08 F7 00 00 10
|
312
309
|
).join(' ')
|
313
|
-
caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments..",
|
310
|
+
#caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments..",
|
314
311
|
count1, count2)
|
315
312
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
316
313
|
assert_equal(target, result, caption)
|
317
314
|
|
318
315
|
|
319
316
|
# Test the parameters pass to the worksheets
|
320
|
-
caption += ' (params)'
|
317
|
+
#caption += ' (params)'
|
321
318
|
result_ids = []
|
322
319
|
target_ids = [
|
323
320
|
1024, 1, 3, 1026,
|
@@ -351,14 +348,14 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
351
348
|
1E F1 10 00 00 00 0D 00 00 08 0C 00 00 08 17 00
|
352
349
|
00 08 F7 00 00 10
|
353
350
|
).join(' ')
|
354
|
-
caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments..",
|
351
|
+
#caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments..",
|
355
352
|
count1, count2)
|
356
353
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
357
354
|
assert_equal(target, result, caption)
|
358
355
|
|
359
356
|
|
360
357
|
# Test the parameters pass to the worksheets
|
361
|
-
caption += ' (params)'
|
358
|
+
#caption += ' (params)'
|
362
359
|
result_ids = []
|
363
360
|
target_ids = [
|
364
361
|
1024, 1, 1024, 2047,
|
@@ -392,14 +389,14 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
392
389
|
1E F1 10 00 00 00 0D 00 00 08 0C 00 00 08 17 00
|
393
390
|
00 08 F7 00 00 10
|
394
391
|
).join(' ')
|
395
|
-
caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments..",
|
392
|
+
#caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments..",
|
396
393
|
count1, count2)
|
397
394
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
398
395
|
assert_equal(target, result, caption)
|
399
396
|
|
400
397
|
|
401
398
|
# Test the parameters pass to the worksheets
|
402
|
-
caption += ' (params)'
|
399
|
+
#caption += ' (params)'
|
403
400
|
result_ids = []
|
404
401
|
target_ids = [
|
405
402
|
1024, 1, 1024, 2047,
|
@@ -434,14 +431,14 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
434
431
|
1E F1 10 00 00 00 0D 00 00 08 0C 00 00 08 17 00
|
435
432
|
00 08 F7 00 00 10
|
436
433
|
).join(' ')
|
437
|
-
caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments..",
|
434
|
+
#caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments..",
|
438
435
|
count1, count2)
|
439
436
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
440
437
|
assert_equal(target, result, caption)
|
441
438
|
|
442
439
|
|
443
440
|
# Test the parameters pass to the worksheets
|
444
|
-
caption += ' (params)'
|
441
|
+
#caption += ' (params)'
|
445
442
|
result_ids = []
|
446
443
|
target_ids = [
|
447
444
|
1024, 1, 1025, 2048,
|
@@ -475,14 +472,14 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
475
472
|
C0 01 40 00 00 08 40 00 1E F1 10 00 00 00 0D 00
|
476
473
|
00 08 0C 00 00 08 17 00 00 08 F7 00 00 10
|
477
474
|
).join(' ')
|
478
|
-
caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments..",
|
475
|
+
#caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments..",
|
479
476
|
count1, count2)
|
480
477
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
481
478
|
assert_equal(target, result, caption)
|
482
479
|
|
483
480
|
|
484
481
|
# Test the parameters pass to the worksheets
|
485
|
-
caption += ' (params)'
|
482
|
+
#caption += ' (params)'
|
486
483
|
result_ids = []
|
487
484
|
target_ids = [
|
488
485
|
1024, 1, 1025, 2048,
|
@@ -520,14 +517,14 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
520
517
|
C0 01 40 00 00 08 40 00 1E F1 10 00 00 00 0D 00
|
521
518
|
00 08 0C 00 00 08 17 00 00 08 F7 00 00 10
|
522
519
|
).join(' ')
|
523
|
-
caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments,"+
|
520
|
+
#caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments,"+
|
524
521
|
"Sheet3: %4d comments.", count1, count2, count3)
|
525
522
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
526
523
|
assert_equal(target, result, caption)
|
527
524
|
|
528
525
|
|
529
526
|
# Test the parameters pass to the worksheets
|
530
|
-
caption += ' (params)'
|
527
|
+
#caption += ' (params)'
|
531
528
|
result_ids = []
|
532
529
|
target_ids = [
|
533
530
|
1024, 1, 1024, 2047,
|
@@ -566,14 +563,14 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
566
563
|
C0 01 40 00 00 08 40 00 1E F1 10 00 00 00 0D 00
|
567
564
|
00 08 0C 00 00 08 17 00 00 08 F7 00 00 10
|
568
565
|
).join(' ')
|
569
|
-
caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments,"+
|
566
|
+
#caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments,"+
|
570
567
|
"Sheet3: %4d comments.", count1, count2, count3)
|
571
568
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
572
569
|
assert_equal(target, result, caption)
|
573
570
|
|
574
571
|
|
575
572
|
# Test the parameters pass to the worksheets
|
576
|
-
caption += ' (params)'
|
573
|
+
#caption += ' (params)'
|
577
574
|
result_ids = []
|
578
575
|
target_ids = [
|
579
576
|
1024, 1, 1024, 2047,
|
@@ -613,14 +610,14 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
613
610
|
C0 01 40 00 00 08 40 00 1E F1 10 00 00 00 0D 00
|
614
611
|
00 08 0C 00 00 08 17 00 00 08 F7 00 00 10
|
615
612
|
).join(' ')
|
616
|
-
caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments,"+
|
613
|
+
#caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments,"+
|
617
614
|
"Sheet3: %4d comments.", count1, count2, count3)
|
618
615
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
619
616
|
assert_equal(target, result, caption)
|
620
617
|
|
621
618
|
|
622
619
|
# Test the parameters pass to the worksheets
|
623
|
-
caption += ' (params)'
|
620
|
+
#caption += ' (params)'
|
624
621
|
result_ids = []
|
625
622
|
target_ids = [
|
626
623
|
1024, 1, 1025, 2048,
|
@@ -660,14 +657,14 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
660
657
|
C0 01 40 00 00 08 40 00 1E F1 10 00 00 00 0D 00
|
661
658
|
00 08 0C 00 00 08 17 00 00 08 F7 00 00 10
|
662
659
|
).join(' ')
|
663
|
-
caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments,"+
|
660
|
+
#caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments,"+
|
664
661
|
"Sheet3: %4d comments.", count1, count2, count3)
|
665
662
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
666
663
|
assert_equal(target, result, caption)
|
667
664
|
|
668
665
|
|
669
666
|
# Test the parameters pass to the worksheets
|
670
|
-
caption += ' (params)'
|
667
|
+
#caption += ' (params)'
|
671
668
|
result_ids = []
|
672
669
|
target_ids = [
|
673
670
|
1024, 1, 1025, 2048,
|
@@ -717,14 +714,14 @@ class TC_mso_drawing_group < Test::Unit::TestCase
|
|
717
714
|
C0 01 40 00 00 08 40 00 1E F1 10 00 00 00 0D 00
|
718
715
|
00 08 0C 00 00 08 17 00 00 08 F7 00 00 10
|
719
716
|
).join(' ')
|
720
|
-
caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments,"+
|
717
|
+
#caption = sprintf( " \tSheet1: %4d comments, Sheet2: %4d comments,"+
|
721
718
|
"Sheet3: %4d comments.", count1, count2, count3)
|
722
719
|
result = unpack_record(@workbook.add_mso_drawing_group)
|
723
720
|
assert_equal(target, result, caption)
|
724
721
|
|
725
722
|
|
726
723
|
# Test the parameters pass to the worksheets
|
727
|
-
caption += ' (params)'
|
724
|
+
#caption += ' (params)'
|
728
725
|
result_ids = []
|
729
726
|
target_ids = [
|
730
727
|
1024, 1, 1025, 2048,
|
data/test/test_23_note.rb
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
require 'helper'
|
15
15
|
require 'stringio'
|
16
16
|
|
17
|
-
class TC_note < Test
|
17
|
+
class TC_note < Minitest::Test
|
18
18
|
|
19
19
|
def setup
|
20
20
|
@workbook = WriteExcel.new(StringIO.new)
|
@@ -22,11 +22,11 @@ class TC_note < Test::Unit::TestCase
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def teardown
|
25
|
-
if @workbook.instance_variable_get(
|
26
|
-
@workbook.instance_variable_get(
|
25
|
+
if @workbook.instance_variable_get("@filehandle")
|
26
|
+
@workbook.instance_variable_get("@filehandle").close(true)
|
27
27
|
end
|
28
|
-
if @worksheet.instance_variable_get(
|
29
|
-
@worksheet.instance_variable_get(
|
28
|
+
if @worksheet.instance_variable_get("@filehandle")
|
29
|
+
@worksheet.instance_variable_get("@filehandle").close(true)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
data/test/test_24_txo.rb
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
require 'helper'
|
15
15
|
require 'stringio'
|
16
16
|
|
17
|
-
class TC_txo < Test
|
17
|
+
class TC_txo < Minitest::Test
|
18
18
|
|
19
19
|
def setup
|
20
20
|
@workbook = WriteExcel.new(StringIO.new)
|
@@ -22,11 +22,11 @@ class TC_txo < Test::Unit::TestCase
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def teardown
|
25
|
-
if @workbook.instance_variable_get(
|
26
|
-
@workbook.instance_variable_get(
|
25
|
+
if @workbook.instance_variable_get("@filehandle")
|
26
|
+
@workbook.instance_variable_get("@filehandle").close(true)
|
27
27
|
end
|
28
|
-
if @worksheet.instance_variable_get(
|
29
|
-
@worksheet.instance_variable_get(
|
28
|
+
if @worksheet.instance_variable_get("@filehandle")
|
29
|
+
@worksheet.instance_variable_get("@filehandle").close(true)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
require 'helper'
|
18
18
|
require 'stringio'
|
19
19
|
|
20
|
-
class TC_position_object < Test
|
20
|
+
class TC_position_object < Minitest::Test
|
21
21
|
|
22
22
|
def setup
|
23
23
|
@test_file = StringIO.new
|
@@ -26,11 +26,11 @@ class TC_position_object < Test::Unit::TestCase
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def teardown
|
29
|
-
if @workbook.instance_variable_get(
|
30
|
-
@workbook.instance_variable_get(
|
29
|
+
if @workbook.instance_variable_get("@filehandle")
|
30
|
+
@workbook.instance_variable_get("@filehandle").close(true)
|
31
31
|
end
|
32
|
-
if @worksheet.instance_variable_get(
|
33
|
-
@worksheet.instance_variable_get(
|
32
|
+
if @worksheet.instance_variable_get("@filehandle")
|
33
|
+
@worksheet.instance_variable_get("@filehandle").close(true)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
data/test/test_26_autofilter.rb
CHANGED
data/test/test_27_autofilter.rb
CHANGED