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
data/test/test_ole.rb
DELETED
@@ -1,102 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
require 'helper'
|
3
|
-
require 'stringio'
|
4
|
-
|
5
|
-
class TC_OLE < Test::Unit::TestCase
|
6
|
-
|
7
|
-
def setup
|
8
|
-
@file = StringIO.new
|
9
|
-
@ole = OLEWriter.new(@file)
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_constructor
|
13
|
-
assert_kind_of(OLEWriter, @ole)
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_constants
|
17
|
-
assert_equal(7087104, OLEWriter::MaxSize)
|
18
|
-
assert_equal(4096, OLEWriter::BlockSize)
|
19
|
-
assert_equal(512, OLEWriter::BlockDiv)
|
20
|
-
assert_equal(127, OLEWriter::ListBlocks)
|
21
|
-
end
|
22
|
-
|
23
|
-
def test_calculate_sizes
|
24
|
-
assert_respond_to(@ole, :calculate_sizes)
|
25
|
-
assert_nothing_raised{ @ole.calculate_sizes }
|
26
|
-
assert_equal(0, @ole.big_blocks)
|
27
|
-
assert_equal(1, @ole.list_blocks)
|
28
|
-
assert_equal(0, @ole.root_start)
|
29
|
-
end
|
30
|
-
|
31
|
-
def test_set_size_too_big
|
32
|
-
assert(!@ole.set_size(999999999))
|
33
|
-
end
|
34
|
-
|
35
|
-
def test_book_size_large
|
36
|
-
assert_nothing_raised{ @ole.set_size(8192) }
|
37
|
-
assert_equal(8192, @ole.book_size)
|
38
|
-
end
|
39
|
-
|
40
|
-
def test_book_size_small
|
41
|
-
assert_nothing_raised{ @ole.set_size(2048) }
|
42
|
-
assert_equal(4096, @ole.book_size)
|
43
|
-
end
|
44
|
-
|
45
|
-
def test_biff_size
|
46
|
-
assert_nothing_raised{ @ole.set_size(2048) }
|
47
|
-
assert_equal(2048, @ole.biff_size)
|
48
|
-
end
|
49
|
-
|
50
|
-
def test_size_allowed
|
51
|
-
assert_nothing_raised{ @ole.set_size }
|
52
|
-
assert_equal(true, @ole.size_allowed)
|
53
|
-
end
|
54
|
-
|
55
|
-
def test_big_block_size_default
|
56
|
-
assert_nothing_raised{ @ole.set_size }
|
57
|
-
assert_nothing_raised{ @ole.calculate_sizes }
|
58
|
-
assert_equal(8, @ole.big_blocks, "Bad big block size")
|
59
|
-
end
|
60
|
-
|
61
|
-
def test_big_block_size_rounded_up
|
62
|
-
assert_nothing_raised{ @ole.set_size(4099) }
|
63
|
-
assert_nothing_raised{ @ole.calculate_sizes }
|
64
|
-
assert_equal(9, @ole.big_blocks, "Bad big block size")
|
65
|
-
end
|
66
|
-
|
67
|
-
def test_list_block_size
|
68
|
-
assert_nothing_raised{ @ole.set_size }
|
69
|
-
assert_nothing_raised{ @ole.calculate_sizes }
|
70
|
-
assert_equal(1, @ole.list_blocks, "Bad list block size")
|
71
|
-
end
|
72
|
-
|
73
|
-
def test_root_start_size_default
|
74
|
-
assert_nothing_raised{ @ole.set_size }
|
75
|
-
assert_nothing_raised{ @ole.calculate_sizes }
|
76
|
-
assert_equal(8, @ole.big_blocks, "Bad root start size")
|
77
|
-
end
|
78
|
-
|
79
|
-
def test_root_start_size_rounded_up
|
80
|
-
assert_nothing_raised{ @ole.set_size(4099) }
|
81
|
-
assert_nothing_raised{ @ole.calculate_sizes }
|
82
|
-
assert_equal(9, @ole.big_blocks, "Bad root start size")
|
83
|
-
end
|
84
|
-
|
85
|
-
def test_write_header
|
86
|
-
assert_nothing_raised{ @ole.write_header }
|
87
|
-
#assert_nothing_raised{ @ole.close }
|
88
|
-
#assert_equal(512, File.size(@file))
|
89
|
-
end
|
90
|
-
|
91
|
-
def test_write_big_block_depot
|
92
|
-
assert_nothing_raised{ @ole.write_big_block_depot }
|
93
|
-
#assert_nothing_raised{ @ole.close }
|
94
|
-
#assert_equal(8, File.size(@file))
|
95
|
-
end
|
96
|
-
|
97
|
-
def test_write_property_storage_size
|
98
|
-
assert_nothing_raised{ @ole.write_property_storage }
|
99
|
-
#assert_nothing_raised{ @ole.close }
|
100
|
-
#assert_equal(512, File.size(@file))
|
101
|
-
end
|
102
|
-
end
|