writeexcel 0.6.9 → 0.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +2 -0
- data/VERSION +1 -1
- data/lib/writeexcel/biffwriter.rb +29 -43
- data/lib/writeexcel/cell_range.rb +332 -0
- data/lib/writeexcel/chart.rb +50 -51
- data/lib/writeexcel/col_info.rb +87 -0
- data/lib/writeexcel/comments.rb +456 -0
- data/lib/writeexcel/convert_date_time.rb +117 -0
- data/lib/writeexcel/data_validations.rb +370 -0
- data/lib/writeexcel/debug_info.rb +5 -1
- data/lib/writeexcel/embedded_chart.rb +35 -0
- data/lib/writeexcel/format.rb +1 -1
- data/lib/writeexcel/formula.rb +3 -3
- data/lib/writeexcel/helper.rb +3 -0
- data/lib/writeexcel/image.rb +61 -1
- data/lib/writeexcel/olewriter.rb +2 -8
- data/lib/writeexcel/outline.rb +24 -0
- data/lib/writeexcel/shared_string_table.rb +153 -0
- data/lib/writeexcel/workbook.rb +86 -444
- data/lib/writeexcel/worksheet.rb +693 -2029
- data/lib/writeexcel/worksheets.rb +25 -0
- data/lib/writeexcel/write_file.rb +34 -15
- data/test/test_02_merge_formats.rb +0 -4
- data/test/test_04_dimensions.rb +0 -4
- data/test/test_05_rows.rb +0 -4
- data/test/test_06_extsst.rb +3 -6
- data/test/test_11_date_time.rb +0 -4
- data/test/test_12_date_only.rb +262 -231
- data/test/test_13_date_seconds.rb +0 -4
- data/test/test_21_escher.rb +71 -84
- data/test/test_22_mso_drawing_group.rb +0 -4
- data/test/test_23_note.rb +5 -21
- data/test/test_24_txo.rb +6 -7
- data/test/test_25_position_object.rb +0 -4
- data/test/test_26_autofilter.rb +0 -5
- data/test/test_27_autofilter.rb +0 -5
- data/test/test_28_autofilter.rb +0 -5
- data/test/test_29_process_jpg.rb +1 -1
- data/test/test_30_validation_dval.rb +4 -7
- data/test/test_31_validation_dv_strings.rb +9 -12
- data/test/test_32_validation_dv_formula.rb +11 -14
- data/test/test_42_set_properties.rb +0 -3
- data/test/test_50_name_stored.rb +0 -4
- data/test/test_51_name_print_area.rb +0 -4
- data/test/test_52_name_print_titles.rb +0 -4
- data/test/test_53_autofilter.rb +0 -4
- data/test/test_60_chart_generic.rb +42 -46
- data/test/test_61_chart_subclasses.rb +7 -11
- data/test/test_62_chart_formats.rb +12 -16
- data/test/test_63_chart_area_formats.rb +3 -7
- data/test/test_biff.rb +0 -4
- data/test/test_big_workbook.rb +17 -0
- data/test/test_format.rb +0 -3
- data/test/test_ole.rb +0 -4
- data/test/test_storage_lite.rb +0 -9
- data/test/test_workbook.rb +0 -4
- data/test/test_worksheet.rb +3 -7
- data/writeexcel.gemspec +12 -2
- metadata +12 -2
data/test/test_24_txo.rb
CHANGED
@@ -21,35 +21,34 @@ def setup
|
|
21
21
|
@worksheet = @workbook.add_worksheet
|
22
22
|
end
|
23
23
|
|
24
|
-
def teardown
|
25
|
-
@workbook.close
|
26
|
-
end
|
27
|
-
|
28
24
|
def test_txo
|
29
25
|
string = 'aaa'
|
26
|
+
comment = Writeexcel::Worksheet::Comment.new(@worksheet, 1, 1, ' ')
|
30
27
|
caption = " \t_store_txo()"
|
31
28
|
target = %w(
|
32
29
|
B6 01 12 00 12 02 00 00 00 00 00 00 00 00 03 00
|
33
30
|
10 00 00 00 00 00
|
34
31
|
).join(' ')
|
35
32
|
|
36
|
-
result = unpack_record(
|
33
|
+
result = unpack_record(comment.__send__("store_txo", string.length))
|
37
34
|
assert_equal(target, result, caption)
|
38
35
|
end
|
39
36
|
|
40
37
|
def test_first_continue_record_after_txo
|
41
38
|
string = 'aaa'
|
39
|
+
comment = Writeexcel::Worksheet::Comment.new(@worksheet, 1, 1, ' ')
|
42
40
|
caption = " \t_store_txo_continue_1()"
|
43
41
|
target = %w(
|
44
42
|
3C 00 04 00 00 61 61 61
|
45
43
|
).join(' ')
|
46
44
|
|
47
|
-
result = unpack_record(
|
45
|
+
result = unpack_record(comment.__send__("store_txo_continue_1", string))
|
48
46
|
assert_equal(target, result, caption)
|
49
47
|
end
|
50
48
|
|
51
49
|
def test_second_continue_record_after_txo
|
52
50
|
string = 'aaa'
|
51
|
+
comment = Writeexcel::Worksheet::Comment.new(@worksheet, 1, 1, ' ')
|
53
52
|
caption = " \t_store_txo_continue_2()"
|
54
53
|
target = %w(
|
55
54
|
3C 00 10 00 00 00 00 00 00 00 00 00 03 00 00 00
|
@@ -60,7 +59,7 @@ def test_second_continue_record_after_txo
|
|
60
59
|
[string.length, 0]
|
61
60
|
]
|
62
61
|
|
63
|
-
result = unpack_record(
|
62
|
+
result = unpack_record(comment.__send__("store_txo_continue_2", formats))
|
64
63
|
assert_equal(target, result, caption)
|
65
64
|
end
|
66
65
|
|
data/test/test_26_autofilter.rb
CHANGED
data/test/test_27_autofilter.rb
CHANGED
data/test/test_28_autofilter.rb
CHANGED
data/test/test_29_process_jpg.rb
CHANGED
@@ -18,10 +18,7 @@ class TC_validation_dval < Test::Unit::TestCase
|
|
18
18
|
def setup
|
19
19
|
@workbook = WriteExcel.new(StringIO.new)
|
20
20
|
@worksheet = @workbook.add_worksheet
|
21
|
-
|
22
|
-
|
23
|
-
def teardown
|
24
|
-
@workbook.close
|
21
|
+
@validations = Writeexcel::Worksheet::DataValidations.new
|
25
22
|
end
|
26
23
|
|
27
24
|
def test_1
|
@@ -34,7 +31,7 @@ def test_1
|
|
34
31
|
00 00 01 00 00 00
|
35
32
|
).join(' ')
|
36
33
|
|
37
|
-
result = unpack_record(@
|
34
|
+
result = unpack_record(@validations.__send__("dval_record", obj_id, dv_count))
|
38
35
|
assert_equal(target, result, caption)
|
39
36
|
end
|
40
37
|
|
@@ -48,7 +45,7 @@ def test_2
|
|
48
45
|
FF FF 01 00 00 00
|
49
46
|
).join(' ')
|
50
47
|
|
51
|
-
result = unpack_record(@
|
48
|
+
result = unpack_record(@validations.__send__("dval_record", obj_id, dv_count))
|
52
49
|
assert_equal(target, result, caption)
|
53
50
|
end
|
54
51
|
|
@@ -62,7 +59,7 @@ def test_3
|
|
62
59
|
00 00 02 00 00 00
|
63
60
|
).join(' ')
|
64
61
|
|
65
|
-
result = unpack_record(@
|
62
|
+
result = unpack_record(@validations.__send__("dval_record", obj_id, dv_count))
|
66
63
|
assert_equal(target, result, caption)
|
67
64
|
end
|
68
65
|
|
@@ -17,12 +17,9 @@
|
|
17
17
|
class TC_validation_dv_strings < Test::Unit::TestCase
|
18
18
|
|
19
19
|
def setup
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
def teardown
|
25
|
-
@workbook.close
|
20
|
+
workbook = WriteExcel.new(StringIO.new)
|
21
|
+
worksheet = workbook.add_worksheet
|
22
|
+
@data_validation = Writeexcel::Worksheet::DataValidation.new(worksheet.__send__("parser"), {})
|
26
23
|
end
|
27
24
|
|
28
25
|
def test_empty_string
|
@@ -33,7 +30,7 @@ def test_empty_string
|
|
33
30
|
target = %w(
|
34
31
|
01 00 00 00
|
35
32
|
).join(' ')
|
36
|
-
result = unpack_record(@
|
33
|
+
result = unpack_record(@data_validation.__send__("pack_dv_string", string, max_length))
|
37
34
|
assert_equal(target, result, caption)
|
38
35
|
end
|
39
36
|
|
@@ -45,7 +42,7 @@ def test_nil
|
|
45
42
|
target = %w(
|
46
43
|
01 00 00 00
|
47
44
|
).join(' ')
|
48
|
-
result = unpack_record(@
|
45
|
+
result = unpack_record(@data_validation.__send__("pack_dv_string", string, max_length))
|
49
46
|
assert_equal(target, result, caption)
|
50
47
|
end
|
51
48
|
|
@@ -57,7 +54,7 @@ def test_single_space
|
|
57
54
|
target = %w(
|
58
55
|
01 00 00 20
|
59
56
|
).join(' ')
|
60
|
-
result = unpack_record(@
|
57
|
+
result = unpack_record(@data_validation.__send__("pack_dv_string", string, max_length))
|
61
58
|
assert_equal(target, result, caption)
|
62
59
|
end
|
63
60
|
|
@@ -69,7 +66,7 @@ def test_single_character
|
|
69
66
|
target = %w(
|
70
67
|
01 00 00 41
|
71
68
|
).join(' ')
|
72
|
-
result = unpack_record(@
|
69
|
+
result = unpack_record(@data_validation.__send__("pack_dv_string", string, max_length))
|
73
70
|
assert_equal(target, result, caption)
|
74
71
|
end
|
75
72
|
|
@@ -83,7 +80,7 @@ def test_string_longer_than_32_characters_for_dialog_captions
|
|
83
80
|
73 74 72 69 6E 67 20 69 73 20 6C 6F 6E 67 65 72
|
84
81
|
20 74 68 61 6E 20 33 32 20 63 68
|
85
82
|
).join(' ')
|
86
|
-
result = unpack_record(@
|
83
|
+
result = unpack_record(@data_validation.__send__("pack_dv_string", string, max_length))
|
87
84
|
assert_equal(target, result, caption)
|
88
85
|
end
|
89
86
|
|
@@ -111,7 +108,7 @@ def test_string_longer_than_32_characters_for_dialog_messages
|
|
111
108
|
42 43 44 41 42 43 44 41 42 43 44 41 42 43 44 41
|
112
109
|
42 43
|
113
110
|
).join(' ')
|
114
|
-
result = unpack_record(@
|
111
|
+
result = unpack_record(@data_validation.__send__("pack_dv_string", string, max_length))
|
115
112
|
assert_equal(target, result, caption)
|
116
113
|
end
|
117
114
|
|
@@ -19,10 +19,7 @@ def setup
|
|
19
19
|
@workbook = WriteExcel.new(StringIO.new)
|
20
20
|
@worksheet = @workbook.add_worksheet
|
21
21
|
@worksheet2 = @workbook.add_worksheet
|
22
|
-
|
23
|
-
|
24
|
-
def teardown
|
25
|
-
@workbook.close
|
22
|
+
@data_validation = Writeexcel::Worksheet::DataValidation.new(@worksheet.__send__("parser"), {})
|
26
23
|
end
|
27
24
|
|
28
25
|
def test_integer_values
|
@@ -38,7 +35,7 @@ def test_integer_values
|
|
38
35
|
bytes[3] = '00'
|
39
36
|
target = bytes.join(" ")
|
40
37
|
|
41
|
-
result = unpack_record(@
|
38
|
+
result = unpack_record(@data_validation.__send__("pack_dv_formula", formula))
|
42
39
|
assert_equal(target, result, caption)
|
43
40
|
end
|
44
41
|
|
@@ -55,7 +52,7 @@ def test_decimal_values
|
|
55
52
|
bytes[3] = '00'
|
56
53
|
target = bytes.join(" ")
|
57
54
|
|
58
|
-
result = unpack_record(@
|
55
|
+
result = unpack_record(@data_validation.__send__("pack_dv_formula", formula))
|
59
56
|
assert_equal(target, result, caption)
|
60
57
|
end
|
61
58
|
|
@@ -72,7 +69,7 @@ def test_date_values
|
|
72
69
|
bytes[3] = '00'
|
73
70
|
target = bytes.join(" ")
|
74
71
|
|
75
|
-
result = unpack_record(@
|
72
|
+
result = unpack_record(@data_validation.__send__("pack_dv_formula", formula))
|
76
73
|
assert_equal(target, result, caption)
|
77
74
|
end
|
78
75
|
|
@@ -89,7 +86,7 @@ def test_time_values
|
|
89
86
|
bytes[3] = '00'
|
90
87
|
target = bytes.join(" ")
|
91
88
|
|
92
|
-
result = unpack_record(@
|
89
|
+
result = unpack_record(@data_validation.__send__("pack_dv_formula", formula))
|
93
90
|
assert_equal(target, result, caption)
|
94
91
|
end
|
95
92
|
|
@@ -106,7 +103,7 @@ def test_cell_reference_value_C9
|
|
106
103
|
bytes[3] = '00'
|
107
104
|
target = bytes.join(" ")
|
108
105
|
|
109
|
-
result = unpack_record(@
|
106
|
+
result = unpack_record(@data_validation.__send__("pack_dv_formula", formula))
|
110
107
|
assert_equal(target, result, caption)
|
111
108
|
end
|
112
109
|
|
@@ -123,7 +120,7 @@ def test_cell_reference_value_E3_E6
|
|
123
120
|
bytes[3] = '00'
|
124
121
|
target = bytes.join(" ")
|
125
122
|
|
126
|
-
result = unpack_record(@
|
123
|
+
result = unpack_record(@data_validation.__send__("pack_dv_formula", formula))
|
127
124
|
assert_equal(target, result, caption)
|
128
125
|
end
|
129
126
|
|
@@ -140,7 +137,7 @@ def test_cell_reference_value_E3_E6_absolute
|
|
140
137
|
bytes[3] = '00'
|
141
138
|
target = bytes.join(" ")
|
142
139
|
|
143
|
-
result = unpack_record(@
|
140
|
+
result = unpack_record(@data_validation.__send__("pack_dv_formula", formula))
|
144
141
|
assert_equal(target, result, caption)
|
145
142
|
end
|
146
143
|
|
@@ -157,7 +154,7 @@ def test_list_values
|
|
157
154
|
bytes[3] = '00'
|
158
155
|
target = bytes.join(" ")
|
159
156
|
|
160
|
-
result = unpack_record(@
|
157
|
+
result = unpack_record(@data_validation.__send__("pack_dv_formula", formula))
|
161
158
|
assert_equal(target, result, caption)
|
162
159
|
end
|
163
160
|
|
@@ -174,7 +171,7 @@ def test_empty_string
|
|
174
171
|
bytes[3] = '00'
|
175
172
|
target = bytes.join(" ")
|
176
173
|
|
177
|
-
result = unpack_record(@
|
174
|
+
result = unpack_record(@data_validation.__send__("pack_dv_formula", formula))
|
178
175
|
assert_equal(target, result, caption)
|
179
176
|
end
|
180
177
|
|
@@ -191,7 +188,7 @@ def test_undefined_value
|
|
191
188
|
bytes[3] = '00'
|
192
189
|
target = bytes.join(" ")
|
193
190
|
|
194
|
-
result = unpack_record(@
|
191
|
+
result = unpack_record(@data_validation.__send__("pack_dv_formula", formula))
|
195
192
|
assert_equal(target, result, caption)
|
196
193
|
end
|
197
194
|
|
data/test/test_50_name_stored.rb
CHANGED
data/test/test_53_autofilter.rb
CHANGED
@@ -17,11 +17,7 @@ class TC_ChartGeneric < Test::Unit::TestCase
|
|
17
17
|
def setup
|
18
18
|
io = StringIO.new
|
19
19
|
workbook = WriteExcel.new(io)
|
20
|
-
@chart = Writeexcel::Chart.new(workbook, '', 'chart'
|
21
|
-
end
|
22
|
-
|
23
|
-
def teardown
|
24
|
-
@chart.cleanup
|
20
|
+
@chart = Writeexcel::Chart.new(workbook, '', 'chart')
|
25
21
|
end
|
26
22
|
|
27
23
|
###############################################################################
|
@@ -33,13 +29,13 @@ def test_store_fbi
|
|
33
29
|
expected = %w(
|
34
30
|
60 10 0A 00 B8 38 A1 22 C8 00 00 00 05 00
|
35
31
|
).join(' ')
|
36
|
-
got = unpack_record(@chart.store_fbi
|
32
|
+
got = unpack_record(@chart.__send__("store_fbi", 5, 10, 0x38B8, 0x22A1, 0x0000))
|
37
33
|
assert_equal(expected, got, caption)
|
38
34
|
|
39
35
|
expected = %w(
|
40
36
|
60 10 0A 00 B8 38 A1 22 C8 00 00 00 06 00
|
41
37
|
).join(' ')
|
42
|
-
got = unpack_record(@chart.store_fbi
|
38
|
+
got = unpack_record(@chart.__send__("store_fbi", 6, 10, 0x38B8, 0x22A1, 0x0000))
|
43
39
|
assert_equal(expected, got, caption)
|
44
40
|
end
|
45
41
|
|
@@ -54,7 +50,7 @@ def test_store_chart
|
|
54
50
|
38 B8 C2 01
|
55
51
|
).join(' ')
|
56
52
|
values = [0x0000, 0x0000, 0x02DD51E0, 0x01C2B838]
|
57
|
-
got = unpack_record(@chart.store_chart
|
53
|
+
got = unpack_record(@chart.__send__("store_chart", *values))
|
58
54
|
assert_equal(expected, got, caption)
|
59
55
|
end
|
60
56
|
|
@@ -67,7 +63,7 @@ def test_store_series
|
|
67
63
|
expected = %w(
|
68
64
|
03 10 0C 00 01 00 01 00 08 00 08 00 01 00 00 00
|
69
65
|
).join(' ')
|
70
|
-
got = unpack_record(@chart.store_series
|
66
|
+
got = unpack_record(@chart.__send__("store_series", 8, 8))
|
71
67
|
assert_equal(expected, got, caption)
|
72
68
|
end
|
73
69
|
|
@@ -80,7 +76,7 @@ def test_store_begin
|
|
80
76
|
expected = %w(
|
81
77
|
33 10 00 00
|
82
78
|
).join(' ')
|
83
|
-
got = unpack_record(@chart.store_begin)
|
79
|
+
got = unpack_record(@chart.__send__("store_begin"))
|
84
80
|
assert_equal(expected, got, caption)
|
85
81
|
end
|
86
82
|
|
@@ -93,7 +89,7 @@ def test_store_end
|
|
93
89
|
expected = %w(
|
94
90
|
34 10 00 00
|
95
91
|
).join(' ')
|
96
|
-
got = unpack_record(@chart.store_end)
|
92
|
+
got = unpack_record(@chart.__send__("store_end"))
|
97
93
|
assert_equal(expected, got, caption)
|
98
94
|
end
|
99
95
|
|
@@ -107,7 +103,7 @@ def test_store_ai
|
|
107
103
|
expected = %w(
|
108
104
|
51 10 08 00 00 01 00 00 00 00 00 00
|
109
105
|
).join(' ')
|
110
|
-
got = unpack_record(@chart.store_ai
|
106
|
+
got = unpack_record(@chart.__send__("store_ai", *values))
|
111
107
|
assert_equal(expected, got, caption)
|
112
108
|
|
113
109
|
values = [1, 2, ['3B00000000070000000000'].pack('H*')]
|
@@ -115,7 +111,7 @@ def test_store_ai
|
|
115
111
|
51 10 13 00 01 02 00 00 00 00 0B 00 3B 00 00 00
|
116
112
|
00 07 00 00 00 00 00
|
117
113
|
).join(' ')
|
118
|
-
got = unpack_record(@chart.store_ai
|
114
|
+
got = unpack_record(@chart.__send__("store_ai", *values))
|
119
115
|
assert_equal(expected, got, caption)
|
120
116
|
end
|
121
117
|
|
@@ -128,13 +124,13 @@ def test_store_dataformat
|
|
128
124
|
expected = %w(
|
129
125
|
06 10 08 00 FF FF 00 00 00 00 00 00
|
130
126
|
).join(' ')
|
131
|
-
got = unpack_record(@chart.store_dataformat
|
127
|
+
got = unpack_record(@chart.__send__("store_dataformat", 0, 0, 0xFFFF))
|
132
128
|
assert_equal(expected, got, caption)
|
133
129
|
|
134
130
|
expected = %w(
|
135
131
|
06 10 08 00 00 00 00 00 FD FF 00 00
|
136
132
|
).join(' ')
|
137
|
-
got = unpack_record(@chart.store_dataformat
|
133
|
+
got = unpack_record(@chart.__send__("store_dataformat", 0, 0xFFFD, 0))
|
138
134
|
assert_equal(expected, got, caption)
|
139
135
|
end
|
140
136
|
|
@@ -147,7 +143,7 @@ def test_store_3dbarshape
|
|
147
143
|
expected = %w(
|
148
144
|
5F 10 02 00 00 00
|
149
145
|
).join(' ')
|
150
|
-
got = unpack_record(@chart.store_3dbarshape)
|
146
|
+
got = unpack_record(@chart.__send__("store_3dbarshape"))
|
151
147
|
assert_equal(expected, got, caption)
|
152
148
|
end
|
153
149
|
|
@@ -160,7 +156,7 @@ def test_store_sertocrt
|
|
160
156
|
expected = %w(
|
161
157
|
45 10 02 00 00 00
|
162
158
|
).join(' ')
|
163
|
-
got = unpack_record(@chart.store_sertocrt)
|
159
|
+
got = unpack_record(@chart.__send__("store_sertocrt"))
|
164
160
|
assert_equal(expected, got, caption)
|
165
161
|
end
|
166
162
|
|
@@ -173,7 +169,7 @@ def test_store_shtprops
|
|
173
169
|
expected = %w(
|
174
170
|
44 10 04 00 0E 00 00 00
|
175
171
|
).join(' ')
|
176
|
-
got = unpack_record(@chart.store_shtprops)
|
172
|
+
got = unpack_record(@chart.__send__("store_shtprops"))
|
177
173
|
assert_equal(expected, got, caption)
|
178
174
|
end
|
179
175
|
|
@@ -186,7 +182,7 @@ def test_store_defaulttext
|
|
186
182
|
expected = %w(
|
187
183
|
24 10 02 00 02 00
|
188
184
|
).join(' ')
|
189
|
-
got = unpack_record(@chart.store_defaulttext)
|
185
|
+
got = unpack_record(@chart.__send__("store_defaulttext"))
|
190
186
|
assert_equal(expected, got, caption)
|
191
187
|
end
|
192
188
|
|
@@ -201,7 +197,7 @@ def test_store_charttext
|
|
201
197
|
06 FF FF FF 00 00 00 00 00 00 00 00 B1 00 4D 00
|
202
198
|
00 00 00 00
|
203
199
|
).join(' ')
|
204
|
-
got = unpack_record(@chart.store_charttext)
|
200
|
+
got = unpack_record(@chart.__send__("store_charttext"))
|
205
201
|
assert_equal(expected, got, caption)
|
206
202
|
end
|
207
203
|
|
@@ -214,7 +210,7 @@ def test_store_fontx
|
|
214
210
|
expected = %w(
|
215
211
|
26 10 02 00 05 00
|
216
212
|
).join(' ')
|
217
|
-
got = unpack_record(@chart.store_fontx
|
213
|
+
got = unpack_record(@chart.__send__("store_fontx", 5))
|
218
214
|
assert_equal(expected, got, caption)
|
219
215
|
end
|
220
216
|
|
@@ -227,7 +223,7 @@ def test_store_axesused
|
|
227
223
|
expected = %w(
|
228
224
|
46 10 02 00 01 00
|
229
225
|
).join(' ')
|
230
|
-
got = unpack_record(@chart.store_axesused
|
226
|
+
got = unpack_record(@chart.__send__("store_axesused", 1))
|
231
227
|
assert_equal(expected, got, caption)
|
232
228
|
end
|
233
229
|
|
@@ -242,7 +238,7 @@ def test_store_axisparent
|
|
242
238
|
00 00 36 0B 00 00
|
243
239
|
).join(' ')
|
244
240
|
values = [0, 0x00F8, 0x01F5, 0x0E7F, 0x0B36]
|
245
|
-
got = unpack_record(@chart.store_axisparent
|
241
|
+
got = unpack_record(@chart.__send__("store_axisparent", *values))
|
246
242
|
assert_equal(expected, got, caption)
|
247
243
|
end
|
248
244
|
|
@@ -256,7 +252,7 @@ def test_store_axis
|
|
256
252
|
1D 10 12 00 00 00 00 00 00 00 00 00 00 00 00 00
|
257
253
|
00 00 00 00 00 00
|
258
254
|
).join(' ')
|
259
|
-
got = unpack_record(@chart.store_axis
|
255
|
+
got = unpack_record(@chart.__send__("store_axis", 0))
|
260
256
|
assert_equal(expected, got, caption)
|
261
257
|
end
|
262
258
|
|
@@ -269,7 +265,7 @@ def test_store_catserrange
|
|
269
265
|
expected = %w(
|
270
266
|
20 10 08 00 01 00 01 00 01 00 01 00
|
271
267
|
).join(' ')
|
272
|
-
got = unpack_record(@chart.store_catserrange)
|
268
|
+
got = unpack_record(@chart.__send__("store_catserrange"))
|
273
269
|
assert_equal(expected, got, caption)
|
274
270
|
end
|
275
271
|
|
@@ -283,7 +279,7 @@ def test_store_axcext
|
|
283
279
|
62 10 12 00 00 00 00 00 01 00 00 00 01 00 00 00
|
284
280
|
00 00 00 00 EF 00
|
285
281
|
).join(' ')
|
286
|
-
got = unpack_record(@chart.store_axcext)
|
282
|
+
got = unpack_record(@chart.__send__("store_axcext"))
|
287
283
|
assert_equal(expected, got, caption)
|
288
284
|
end
|
289
285
|
|
@@ -298,7 +294,7 @@ def test_store_tick
|
|
298
294
|
00 00 00 00 00 00 00 00 00 00 00 00 23 00 4D 00
|
299
295
|
00 00
|
300
296
|
).join(' ')
|
301
|
-
got = unpack_record(@chart.store_tick)
|
297
|
+
got = unpack_record(@chart.__send__("store_tick"))
|
302
298
|
assert_equal(expected, got, caption)
|
303
299
|
end
|
304
300
|
|
@@ -313,7 +309,7 @@ def test_store_valuerange
|
|
313
309
|
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
314
310
|
00 00 00 00 00 00 00 00 00 00 00 00 1F 01
|
315
311
|
).join(' ')
|
316
|
-
got = unpack_record(@chart.store_valuerange)
|
312
|
+
got = unpack_record(@chart.__send__("store_valuerange"))
|
317
313
|
assert_equal(expected, got, caption)
|
318
314
|
end
|
319
315
|
|
@@ -326,7 +322,7 @@ def test_store_axislineformat
|
|
326
322
|
expected = %w(
|
327
323
|
21 10 02 00 01 00
|
328
324
|
).join(' ')
|
329
|
-
got = unpack_record(@chart.store_axislineformat)
|
325
|
+
got = unpack_record(@chart.__send__("store_axislineformat"))
|
330
326
|
assert_equal(expected, got, caption)
|
331
327
|
end
|
332
328
|
|
@@ -340,7 +336,7 @@ def test_store_lineformat
|
|
340
336
|
07 10 0C 00 00 00 00 00 00 00 FF FF 09 00 4D 00
|
341
337
|
).join(' ')
|
342
338
|
values = [0x00000000, 0x0000, 0xFFFF, 0x0009, 0x004D]
|
343
|
-
got = unpack_record(@chart.store_lineformat
|
339
|
+
got = unpack_record(@chart.__send__("store_lineformat", *values))
|
344
340
|
assert_equal(expected, got, caption)
|
345
341
|
end
|
346
342
|
|
@@ -353,7 +349,7 @@ def test_store_frame
|
|
353
349
|
expected = %w(
|
354
350
|
32 10 04 00 00 00 03 00
|
355
351
|
).join(' ')
|
356
|
-
got = unpack_record(@chart.store_frame
|
352
|
+
got = unpack_record(@chart.__send__("store_frame", 0x00, 0x03))
|
357
353
|
assert_equal(expected, got, caption)
|
358
354
|
end
|
359
355
|
|
@@ -368,7 +364,7 @@ def test_store_areaformat
|
|
368
364
|
16 00 4F 00
|
369
365
|
).join(' ')
|
370
366
|
values = [0x00C0C0C0, 0x00, 0x01, 0x00, 0x16, 0x4F]
|
371
|
-
got = unpack_record(@chart.store_areaformat
|
367
|
+
got = unpack_record(@chart.__send__("store_areaformat", *values))
|
372
368
|
assert_equal(expected, got, caption)
|
373
369
|
end
|
374
370
|
|
@@ -382,7 +378,7 @@ def test_store_chartformat
|
|
382
378
|
14 10 14 00 00 00 00 00 00 00 00 00 00 00 00 00
|
383
379
|
00 00 00 00 00 00 00 00
|
384
380
|
).join(' ')
|
385
|
-
got = unpack_record(@chart.store_chartformat)
|
381
|
+
got = unpack_record(@chart.__send__("store_chartformat"))
|
386
382
|
assert_equal(expected, got, caption)
|
387
383
|
end
|
388
384
|
|
@@ -397,7 +393,7 @@ def test_store_legend
|
|
397
393
|
9C 00 00 00 00 01 0F 00
|
398
394
|
).join(' ')
|
399
395
|
values = [0x05F9, 0x0EE9, 0x047D, 0x009C, 0x00, 0x01, 0x000F]
|
400
|
-
got = unpack_record(@chart.store_legend
|
396
|
+
got = unpack_record(@chart.__send__("store_legend", *values))
|
401
397
|
assert_equal(expected, got, caption)
|
402
398
|
end
|
403
399
|
|
@@ -412,7 +408,7 @@ def test_store_pos
|
|
412
408
|
00 00 00 00 00 00 00 00
|
413
409
|
).join(' ')
|
414
410
|
values = [5, 2, 0x0E83, 0x06F9, 0, 0]
|
415
|
-
got = unpack_record(@chart.store_pos
|
411
|
+
got = unpack_record(@chart.__send__("store_pos", *values))
|
416
412
|
assert_equal(expected, got, caption)
|
417
413
|
end
|
418
414
|
|
@@ -428,7 +424,7 @@ def test_store_text
|
|
428
424
|
20 10 00 00
|
429
425
|
).join(' ')
|
430
426
|
values = [0xFFFFFF46, 0xFFFFFF06, 0, 0, 0x00B1, 0x1020]
|
431
|
-
got = unpack_record(@chart.store_text
|
427
|
+
got = unpack_record(@chart.__send__("store_text", *values))
|
432
428
|
assert_equal(expected, got, caption)
|
433
429
|
end
|
434
430
|
|
@@ -441,7 +437,7 @@ def test_store_plotgrowth
|
|
441
437
|
expected = %w(
|
442
438
|
64 10 08 00 00 00 01 00 00 00 01 00
|
443
439
|
).join(' ')
|
444
|
-
got = unpack_record(@chart.store_plotgrowth)
|
440
|
+
got = unpack_record(@chart.__send__("store_plotgrowth"))
|
445
441
|
assert_equal(expected, got, caption)
|
446
442
|
end
|
447
443
|
|
@@ -457,7 +453,7 @@ def test_store_seriestext
|
|
457
453
|
69 65 73 31
|
458
454
|
).join(' ')
|
459
455
|
str = 'Name for Series1'
|
460
|
-
got = unpack_record(@chart.store_seriestext
|
456
|
+
got = unpack_record(@chart.__send__("store_seriestext", str, 0))
|
461
457
|
assert_equal(expected, got, caption)
|
462
458
|
end
|
463
459
|
|
@@ -473,7 +469,7 @@ def test_store_seriestext_utf16
|
|
473
469
|
69 00 65 00 73 00 31 00
|
474
470
|
).join(' ')
|
475
471
|
str = 'Name for Series1'.unpack('C*').pack('n*')
|
476
|
-
got = unpack_record(@chart.store_seriestext
|
472
|
+
got = unpack_record(@chart.__send__("store_seriestext", str, 1))
|
477
473
|
assert_equal(expected, got, caption)
|
478
474
|
end
|
479
475
|
|
@@ -486,7 +482,7 @@ def test_store_objectlink
|
|
486
482
|
expected = %w(
|
487
483
|
27 10 06 00 01 00 00 00 00 00
|
488
484
|
).join(' ')
|
489
|
-
got = unpack_record(@chart.store_objectlink
|
485
|
+
got = unpack_record(@chart.__send__("store_objectlink", 1))
|
490
486
|
assert_equal(expected, got, caption)
|
491
487
|
end
|
492
488
|
|
@@ -499,7 +495,7 @@ def test_store_pieformat
|
|
499
495
|
expected = %w(
|
500
496
|
0B 10 02 00 00 00
|
501
497
|
).join(' ')
|
502
|
-
got = unpack_record(@chart.store_pieformat)
|
498
|
+
got = unpack_record(@chart.__send__("store_pieformat"))
|
503
499
|
assert_equal(expected, got, caption)
|
504
500
|
end
|
505
501
|
|
@@ -514,7 +510,7 @@ def test_store_markerformat
|
|
514
510
|
4D 00 4D 00 3C 00 00 00
|
515
511
|
).join(' ')
|
516
512
|
values = [0x00, 0x00, 0x02, 0x01, 0x4D, 0x4D, 0x3C]
|
517
|
-
got = unpack_record(@chart.store_markerformat
|
513
|
+
got = unpack_record(@chart.__send__("store_markerformat", *values))
|
518
514
|
assert_equal(expected, got, caption)
|
519
515
|
end
|
520
516
|
|
@@ -527,7 +523,7 @@ def test_store_dropbar
|
|
527
523
|
expected = %w(
|
528
524
|
3D 10 02 00 96 00
|
529
525
|
).join(' ')
|
530
|
-
got = unpack_record(@chart.store_dropbar)
|
526
|
+
got = unpack_record(@chart.__send__("store_dropbar"))
|
531
527
|
assert_equal(expected, got, caption)
|
532
528
|
end
|
533
529
|
|
@@ -540,7 +536,7 @@ def test_store_chartline
|
|
540
536
|
expected = %w(
|
541
537
|
1C 10 02 00 01 00
|
542
538
|
).join(' ')
|
543
|
-
got = unpack_record(@chart.store_chartline)
|
539
|
+
got = unpack_record(@chart.__send__("store_chartline"))
|
544
540
|
assert_equal(expected, got, caption)
|
545
541
|
end
|
546
542
|
|
@@ -553,7 +549,7 @@ def test_store_serparent
|
|
553
549
|
expected = %w(
|
554
550
|
4A 10 02 00 01 00
|
555
551
|
).join(' ')
|
556
|
-
got = unpack_record(@chart.store_serparent
|
552
|
+
got = unpack_record(@chart.__send__("store_serparent", 1))
|
557
553
|
assert_equal(expected, got, caption)
|
558
554
|
end
|
559
555
|
|
@@ -568,7 +564,7 @@ def test_store_serauxtrend
|
|
568
564
|
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
569
565
|
).join(' ')
|
570
566
|
values = [0x00, 0x01, 0x00, 0x00]
|
571
|
-
got = unpack_record(@chart.store_serauxtrend
|
567
|
+
got = unpack_record(@chart.__send__("store_serauxtrend", *values))
|
572
568
|
assert_equal(expected, got, caption)
|
573
569
|
end
|
574
570
|
|