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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/Changes +27 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +2 -2
  5. data/lib/write_xlsx/chart.rb +25 -22
  6. data/lib/write_xlsx/chart/axis.rb +2 -2
  7. data/lib/write_xlsx/chart/legend.rb +14 -0
  8. data/lib/write_xlsx/chart/pie.rb +9 -7
  9. data/lib/write_xlsx/chartsheet.rb +30 -2
  10. data/lib/write_xlsx/format.rb +4 -4
  11. data/lib/write_xlsx/package/comments.rb +50 -47
  12. data/lib/write_xlsx/package/conditional_format.rb +9 -1
  13. data/lib/write_xlsx/package/table.rb +5 -0
  14. data/lib/write_xlsx/utility.rb +59 -1
  15. data/lib/write_xlsx/version.rb +1 -1
  16. data/lib/write_xlsx/workbook.rb +30 -5
  17. data/lib/write_xlsx/worksheet.rb +31 -13
  18. data/lib/write_xlsx/worksheet/data_validation.rb +10 -14
  19. data/test/chart/test_write_legend_pos.rb +9 -1
  20. data/test/chartsheet/test_write_sheet_protection.rb +91 -0
  21. data/test/package/comments/test_comments_01.rb +54 -0
  22. data/test/package/comments/test_comments_02.rb +54 -0
  23. data/test/perl_output/formats.xlsx +0 -0
  24. data/test/regression/images/happy.jpg +0 -0
  25. data/test/regression/test_array_formula03.rb +36 -0
  26. data/test/regression/test_autofilter08.rb +110 -0
  27. data/test/regression/test_autofilter09.rb +110 -0
  28. data/test/regression/test_autofilter10.rb +110 -0
  29. data/test/regression/test_chart_axis42.rb +44 -0
  30. data/test/regression/test_chart_axis43.rb +44 -0
  31. data/test/regression/test_chart_legend03.rb +41 -0
  32. data/test/regression/test_chart_legend04.rb +41 -0
  33. data/test/regression/test_chart_legend05.rb +41 -0
  34. data/test/regression/test_chart_legend06.rb +41 -0
  35. data/test/regression/test_chart_legend07.rb +38 -0
  36. data/test/regression/test_comment13.rb +36 -0
  37. data/test/regression/test_cond_format19.rb +64 -0
  38. data/test/regression/test_cond_format20.rb +43 -0
  39. data/test/regression/test_format15.rb +26 -0
  40. data/test/regression/test_image36.rb +26 -0
  41. data/test/regression/test_table23.rb +56 -0
  42. data/test/regression/xlsx_files/array_formula03.xlsx +0 -0
  43. data/test/regression/xlsx_files/autofilter08.xlsx +0 -0
  44. data/test/regression/xlsx_files/autofilter09.xlsx +0 -0
  45. data/test/regression/xlsx_files/autofilter10.xlsx +0 -0
  46. data/test/regression/xlsx_files/chart_axis42.xlsx +0 -0
  47. data/test/regression/xlsx_files/chart_axis43.xlsx +0 -0
  48. data/test/regression/xlsx_files/chart_legend03.xlsx +0 -0
  49. data/test/regression/xlsx_files/chart_legend04.xlsx +0 -0
  50. data/test/regression/xlsx_files/chart_legend05.xlsx +0 -0
  51. data/test/regression/xlsx_files/chart_legend06.xlsx +0 -0
  52. data/test/regression/xlsx_files/chart_legend07.xlsx +0 -0
  53. data/test/regression/xlsx_files/comment13.xlsx +0 -0
  54. data/test/regression/xlsx_files/cond_format19.xlsx +0 -0
  55. data/test/regression/xlsx_files/cond_format20.xlsx +0 -0
  56. data/test/regression/xlsx_files/format15.xlsx +0 -0
  57. data/test/regression/xlsx_files/image36.xlsx +0 -0
  58. data/test/regression/xlsx_files/table23.xlsx +0 -0
  59. data/test/workbook/test_write_workbook_view.rb +36 -0
  60. data/test/worksheet/test_write_data_validation_02.rb +17 -0
  61. data/test/worksheet/test_write_sheet_view.rb +19 -1
  62. metadata +79 -4
  63. 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