Sha256: ca8b0f30dfe2a80f3436949bd29e36cee84a21c7a64b3ea150e1107c1cc83e88

Contents?: true

Size: 716 Bytes

Versions: 51

Compression:

Stored size: 716 Bytes

Contents

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

class TestSharedStrings01 < Test::Unit::TestCase
  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

51 entries across 51 versions & 1 rubygems

Version Path
write_xlsx-0.86.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.85.11 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.85.10 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.85.9 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.85.8 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.85.7 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.85.6 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.85.5 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.85.4 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.85.3 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.85.2 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.85.1 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.83.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.81.1 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.81.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.80.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.79.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.78.0 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.77.2 test/package/shared_strings/test_shared_strings01.rb
write_xlsx-0.77.1 test/package/shared_strings/test_shared_strings01.rb