write_xlsx 0.97.0 → 0.99.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes +27 -0
- data/LICENSE.txt +1 -1
- data/README.md +2 -2
- data/lib/write_xlsx/chart.rb +25 -22
- data/lib/write_xlsx/chart/axis.rb +2 -2
- data/lib/write_xlsx/chart/legend.rb +14 -0
- data/lib/write_xlsx/chart/pie.rb +9 -7
- data/lib/write_xlsx/chartsheet.rb +30 -2
- data/lib/write_xlsx/format.rb +4 -4
- data/lib/write_xlsx/package/comments.rb +50 -47
- data/lib/write_xlsx/package/conditional_format.rb +9 -1
- data/lib/write_xlsx/package/table.rb +5 -0
- data/lib/write_xlsx/utility.rb +59 -1
- data/lib/write_xlsx/version.rb +1 -1
- data/lib/write_xlsx/workbook.rb +30 -5
- data/lib/write_xlsx/worksheet.rb +31 -13
- data/lib/write_xlsx/worksheet/data_validation.rb +10 -14
- data/test/chart/test_write_legend_pos.rb +9 -1
- data/test/chartsheet/test_write_sheet_protection.rb +91 -0
- data/test/package/comments/test_comments_01.rb +54 -0
- data/test/package/comments/test_comments_02.rb +54 -0
- data/test/perl_output/formats.xlsx +0 -0
- data/test/regression/images/happy.jpg +0 -0
- data/test/regression/test_array_formula03.rb +36 -0
- data/test/regression/test_autofilter08.rb +110 -0
- data/test/regression/test_autofilter09.rb +110 -0
- data/test/regression/test_autofilter10.rb +110 -0
- data/test/regression/test_chart_axis42.rb +44 -0
- data/test/regression/test_chart_axis43.rb +44 -0
- data/test/regression/test_chart_legend03.rb +41 -0
- data/test/regression/test_chart_legend04.rb +41 -0
- data/test/regression/test_chart_legend05.rb +41 -0
- data/test/regression/test_chart_legend06.rb +41 -0
- data/test/regression/test_chart_legend07.rb +38 -0
- data/test/regression/test_comment13.rb +36 -0
- data/test/regression/test_cond_format19.rb +64 -0
- data/test/regression/test_cond_format20.rb +43 -0
- data/test/regression/test_format15.rb +26 -0
- data/test/regression/test_image36.rb +26 -0
- data/test/regression/test_table23.rb +56 -0
- data/test/regression/xlsx_files/array_formula03.xlsx +0 -0
- data/test/regression/xlsx_files/autofilter08.xlsx +0 -0
- data/test/regression/xlsx_files/autofilter09.xlsx +0 -0
- data/test/regression/xlsx_files/autofilter10.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis42.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis43.xlsx +0 -0
- data/test/regression/xlsx_files/chart_legend03.xlsx +0 -0
- data/test/regression/xlsx_files/chart_legend04.xlsx +0 -0
- data/test/regression/xlsx_files/chart_legend05.xlsx +0 -0
- data/test/regression/xlsx_files/chart_legend06.xlsx +0 -0
- data/test/regression/xlsx_files/chart_legend07.xlsx +0 -0
- data/test/regression/xlsx_files/comment13.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format19.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format20.xlsx +0 -0
- data/test/regression/xlsx_files/format15.xlsx +0 -0
- data/test/regression/xlsx_files/image36.xlsx +0 -0
- data/test/regression/xlsx_files/table23.xlsx +0 -0
- data/test/workbook/test_write_workbook_view.rb +36 -0
- data/test/worksheet/test_write_data_validation_02.rb +17 -0
- data/test/worksheet/test_write_sheet_view.rb +19 -1
- metadata +79 -4
- data/test/package/comments/test_write_text_t.rb +0 -44
@@ -1,44 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
require 'helper'
|
3
|
-
require 'write_xlsx/package/comments'
|
4
|
-
|
5
|
-
class TestWriteTextT < Minitest::Test
|
6
|
-
def setup
|
7
|
-
@comment = Writexlsx::Package::Comments.new(nil)
|
8
|
-
end
|
9
|
-
|
10
|
-
def test_write_text_t_with_center_space
|
11
|
-
@comment.__send__('write_text_t', 'Some text')
|
12
|
-
result = @comment.xml_str
|
13
|
-
expected = '<t>Some text</t>'
|
14
|
-
assert_equal(expected, result)
|
15
|
-
end
|
16
|
-
|
17
|
-
def test_write_text_t_with_beginning_space
|
18
|
-
@comment.__send__('write_text_t', ' Some text')
|
19
|
-
result = @comment.xml_str
|
20
|
-
expected = '<t xml:space="preserve"> Some text</t>'
|
21
|
-
assert_equal(expected, result)
|
22
|
-
end
|
23
|
-
|
24
|
-
def test_write_text_t_with_ending_space
|
25
|
-
@comment.__send__('write_text_t', 'Some text ')
|
26
|
-
result = @comment.xml_str
|
27
|
-
expected = '<t xml:space="preserve">Some text </t>'
|
28
|
-
assert_equal(expected, result)
|
29
|
-
end
|
30
|
-
|
31
|
-
def test_write_text_t_with_both_space
|
32
|
-
@comment.__send__('write_text_t', ' Some text ')
|
33
|
-
result = @comment.xml_str
|
34
|
-
expected = '<t xml:space="preserve"> Some text </t>'
|
35
|
-
assert_equal(expected, result)
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_write_text_t_with_cr
|
39
|
-
@comment.__send__('write_text_t', "Some text\n")
|
40
|
-
result = @comment.xml_str
|
41
|
-
expected = %Q!<t xml:space="preserve">Some text\n</t>!
|
42
|
-
assert_equal(expected, result)
|
43
|
-
end
|
44
|
-
end
|