Sha256: 602a7266e5e28bcaacaa1d4d91e3f2e396961626ad3e1ce1dd9960de73ac44b5

Contents?: true

Size: 710 Bytes

Versions: 19

Compression:

Stored size: 710 Bytes

Contents

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

class TestSharedStrings01 < Minitest::Test
  def test_shared_strings01
    @obj = Writexlsx::Package::SharedStrings.new
    @obj.index('neptune')
    @obj.index('mars')
    5.times { @obj.index('venus') }
    @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"?>
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="7" uniqueCount="3">
  <si>
    <t>neptune</t>
  </si>
  <si>
    <t>mars</t>
  </si>
  <si>
    <t>venus</t>
  </si>
</sst>
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/shared_strings/test_shared_strings01.rb
write_xlsx-1.09.3 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-1.09.2 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-1.09.1 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-1.09.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-1.08.2 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-1.08.1 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-1.08.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-1.07.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-1.04.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-1.02.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-1.01.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-1.00.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.99.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.97.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.90.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.89.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.88.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.87.0 test/package/shared_strings/test_shared_strings01.rb