Sha256: b537a23ad63b138a6d7808a1903f0d53d33486332aa3832f532d5e4fe67fa45e

Contents?: true

Size: 705 Bytes

Versions: 19

Compression:

Stored size: 705 Bytes

Contents

# -*- coding: utf-8 -*-
require 'helper'
require 'write_xlsx'
require 'stringio'

class TestWriteMultilineStringWithUrl < Test::Unit::TestCase
  def setup
    @workbook = WriteXLSX.new(StringIO.new)
    @worksheet = @workbook.add_worksheet('')
  end

  def test_write_with_url_after_cr_string
    url_strings = %w(http:// https:// ftp:// ftps:// mailto: internal: external:)
    col = 0
    row = 0

    url_strings.each do |url_string|
      assert_nothing_raised do
        @worksheet.write(row, col, long_string(url_string))
        row += 1
      end
    end
  end

  def long_string(url_string)
    "*" * Writexlsx::Worksheet::Hyperlink::MAXIMUM_URLS_SIZE <<
      "\n" <<
      url_string
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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