Sha256: 4945c77e50571ab1f236deacd8efb04b8e5051e8dd4ee43bdeed044f8ae98ac2

Contents?: true

Size: 768 Bytes

Versions: 51

Compression:

Stored size: 768 Bytes

Contents

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

class TestSharedStrings02 < Test::Unit::TestCase
  def test_shared_strings02
    @obj = Writexlsx::Package::SharedStrings.new
    @obj.index('abcdefg')
    @obj.index('   abcdefg')
    @obj.index('abcdefg   ')
    @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="3" uniqueCount="3">
  <si>
    <t>abcdefg</t>
  </si>
  <si>
    <t xml:space="preserve">   abcdefg</t>
  </si>
  <si>
    <t xml:space="preserve">abcdefg   </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.77.0 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.76.3 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.76.2 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.76.1 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.76.0 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.75.0 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.74.0 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.73.0 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.72.3.beta1 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.72.2 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.72.1 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.72.0 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.71.0 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.70.0 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.69.0 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.65.1 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.65.0 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.64.1 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.64.0 test/package/shared_strings/test_shared_strings02.rb
write_xlsx-0.62.0 test/package/shared_strings/test_shared_strings02.rb