Sha256: 5c237b3aa0c3583fd8682b912c72e488ee34b8081cf61d5d14582fa73ae6fce2

Contents?: true

Size: 1.35 KB

Versions: 19

Compression:

Stored size: 1.35 KB

Contents

# -*- coding: utf-8 -*-
require 'helper'
require 'write_xlsx/package/app'

class TestApp02 < Minitest::Test
  def test_assemble_xml_file
    @obj = Writexlsx::Package::App.new(nil)
    @obj.add_part_name('Sheet1')
    @obj.add_part_name('Sheet2')
    @obj.add_heading_pair(['Worksheets', 2])
    @obj.assemble_xml_file
    result = got_to_array(@obj.xml_str)
    expected = expected_to_array(<<EOS
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">
  <Application>Microsoft Excel</Application>
  <DocSecurity>0</DocSecurity>
  <ScaleCrop>false</ScaleCrop>
  <HeadingPairs>
    <vt:vector size="2" baseType="variant">
      <vt:variant>
        <vt:lpstr>Worksheets</vt:lpstr>
      </vt:variant>
      <vt:variant>
        <vt:i4>2</vt:i4>
      </vt:variant>
    </vt:vector>
  </HeadingPairs>
  <TitlesOfParts>
    <vt:vector size="2" baseType="lpstr">
      <vt:lpstr>Sheet1</vt:lpstr>
      <vt:lpstr>Sheet2</vt:lpstr>
    </vt:vector>
  </TitlesOfParts>
  <Company>
  </Company>
  <LinksUpToDate>false</LinksUpToDate>
  <SharedDoc>false</SharedDoc>
  <HyperlinksChanged>false</HyperlinksChanged>
  <AppVersion>12.0000</AppVersion>
</Properties>
EOS
    )
    assert_equal(expected, result)
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
write_xlsx-1.09.4 test/package/app/test_app02.rb
write_xlsx-1.09.3 test/package/app/test_app02.rb
write_xlsx-1.09.2 test/package/app/test_app02.rb
write_xlsx-1.09.1 test/package/app/test_app02.rb
write_xlsx-1.09.0 test/package/app/test_app02.rb
write_xlsx-1.08.2 test/package/app/test_app02.rb
write_xlsx-1.08.1 test/package/app/test_app02.rb
write_xlsx-1.08.0 test/package/app/test_app02.rb
write_xlsx-1.07.0 test/package/app/test_app02.rb
write_xlsx-1.04.0 test/package/app/test_app02.rb
write_xlsx-1.02.0 test/package/app/test_app02.rb
write_xlsx-1.01.0 test/package/app/test_app02.rb
write_xlsx-1.00.0 test/package/app/test_app02.rb
write_xlsx-0.99.0 test/package/app/test_app02.rb
write_xlsx-0.97.0 test/package/app/test_app02.rb
write_xlsx-0.90.0 test/package/app/test_app02.rb
write_xlsx-0.89.0 test/package/app/test_app02.rb
write_xlsx-0.88.0 test/package/app/test_app02.rb
write_xlsx-0.87.0 test/package/app/test_app02.rb