Sha256: b7fd3d77380e4d1d727c3f5897c06dd2086fb400e7cd4b06c4aef6a8618c9aa5

Contents?: true

Size: 492 Bytes

Versions: 5

Compression:

Stored size: 492 Bytes

Contents

require 'rubyXL'

describe RubyXL::Text do

  describe '.to_s' do

    it 'should not crash processing UNICODE data' do
      bytes = [ 114, 39, 95, 120, 48, 48, 56, 48, 95, 226, 132, 162, 115,
                32, 103, 105, 114, 108, 102, 114, 105, 101, 110, 100,
                39, 95, 120, 48, 48, 56, 48, 95, 226, 132, 162, 115, 32, 104, 111]

      t = RubyXL::Text.new(:value => bytes.pack("c*").force_encoding('UTF-8'))

      str = t.to_s

      expect(str).to be
    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubyXL-3.3.15 spec/lib/text_spec.rb
rubyXL-3.3.14 spec/lib/text_spec.rb
rubyXL-3.3.13 spec/lib/text_spec.rb
rubyXL-3.3.12 spec/lib/text_spec.rb
rubyXL-3.3.11 spec/lib/text_spec.rb