# -*- coding: utf-8 -*- require 'helper' require 'write_xlsx/workbook' require 'write_xlsx/package/styles' require 'stringio' class TestStyles04 < Minitest::Test def test_styles_04 workbook = WriteXLSX.new(StringIO.new) format1 = workbook.add_format(:top => 7) format2 = workbook.add_format(:top => 4) format3 = workbook.add_format(:top => 11) format4 = workbook.add_format(:top => 9) format5 = workbook.add_format(:top => 3) format6 = workbook.add_format(:top => 1) format7 = workbook.add_format(:top => 12) format8 = workbook.add_format(:top => 13) format9 = workbook.add_format(:top => 10) format10 = workbook.add_format(:top => 8) format11 = workbook.add_format(:top => 2) format12 = workbook.add_format(:top => 5) format13 = workbook.add_format(:top => 6) workbook.__send__('set_default_xf_indices') workbook.__send__('prepare_format_properties') @style = Writexlsx::Package::Styles.new @style.set_style_properties(*workbook.style_properties) @style.assemble_xml_file result = got_to_array(@style.xml_str) expected = expected_to_array(< EOS ) assert_equal(expected, result) end end