Sha256: 5a03a9fc466d0f4e20827603ad1086bfacd904c3b9ba68b822642cf22a9134c6

Contents?: true

Size: 966 Bytes

Versions: 7

Compression:

Stored size: 966 Bytes

Contents

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

class TestRegressionQuoteName03 < Test::Unit::TestCase
  def setup
    setup_dir_var
  end

  def teardown
    @tempfile.close(true)
  end

  def test_quote_name03
    @xlsx = 'quote_name03.xlsx'
    workbook  = WriteXLSX.new(@io)

    data = [
            [1, 2, 3,  4,  5],
            [2, 4, 6,  8, 10],
            [3, 6, 9, 12, 15]
           ]

    # Test quoted/non-quoted sheet names.
    sheetnames = [
                  'Sheet<1', 'Sheet>2', 'Sheet=3', 'Sheet@4',
                  'Sheet^5', 'Sheet`6', 'Sheet_7', 'Sheet~8'
                 ]

    sheetnames.each do |sheetname|
      worksheet = workbook.add_worksheet( sheetname )
      chart = workbook.add_chart( :type => 'pie', :embedded => 1 )

      worksheet.write( 'A1', data )
      chart.add_series(:values => [sheetname, 0, 4, 0, 0])
      worksheet.insert_chart( 'E6', chart, 26, 17 )
    end

    workbook.close
    compare_for_regression
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
write_xlsx-0.86.0 test/regression/test_quote_name03.rb
write_xlsx-0.85.11 test/regression/test_quote_name03.rb
write_xlsx-0.85.10 test/regression/test_quote_name03.rb
write_xlsx-0.85.9 test/regression/test_quote_name03.rb
write_xlsx-0.85.8 test/regression/test_quote_name03.rb
write_xlsx-0.85.7 test/regression/test_quote_name03.rb
write_xlsx-0.85.6 test/regression/test_quote_name03.rb