Sha256: 9f72385fb3c9f7418f3656e7836986d002cafc2254346eb585474004a69e9f45

Contents?: true

Size: 1.78 KB

Versions: 42

Compression:

Stored size: 1.78 KB

Contents

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

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

  def teardown
    File.delete(@xlsx) if File.exist?(@xlsx)
  end

  def test_outline04
    @xlsx = 'outline04.xlsx'
    workbook    = WriteXLSX.new(@xlsx)
    worksheet4  = workbook.add_worksheet('Outline levels')

    # Example 4: Show all possible outline levels.
    levels = [
              'Level 1', 'Level 2', 'Level 3', 'Level 4', 'Level 5', 'Level 6',
              'Level 7', 'Level 6', 'Level 5', 'Level 4', 'Level 3', 'Level 2',
              'Level 1'
             ]

    worksheet4.write_col('A1', levels)

    worksheet4.set_row(0,  nil, nil, nil, 1)
    worksheet4.set_row(1,  nil, nil, nil, 2)
    worksheet4.set_row(2,  nil, nil, nil, 3)
    worksheet4.set_row(3,  nil, nil, nil, 4)
    worksheet4.set_row(4,  nil, nil, nil, 5)
    worksheet4.set_row(5,  nil, nil, nil, 6)
    worksheet4.set_row(6,  nil, nil, nil, 7)
    worksheet4.set_row(7,  nil, nil, nil, 6)
    worksheet4.set_row(8,  nil, nil, nil, 5)
    worksheet4.set_row(9,  nil, nil, nil, 4)
    worksheet4.set_row(10, nil, nil, nil, 3)
    worksheet4.set_row(11, nil, nil, nil, 2)
    worksheet4.set_row(12, nil, nil, nil, 1)

    workbook.close
    compare_xlsx_for_regression(
                                File.join(@regression_output, @xlsx),
                                @xlsx,
                                [
                                 'xl/calcChain.xml',
                                 '[Content_Types].xml',
                                 'xl/_rels/workbook.xml.rels'
                                ],
                                {
                                  'xl/workbook.xml' => ['<workbookView']
                                }
                                )
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
write_xlsx-0.73.0 test/regression/test_outline04.rb
write_xlsx-0.72.3.beta1 test/regression/test_outline04.rb
write_xlsx-0.72.2 test/regression/test_outline04.rb
write_xlsx-0.72.1 test/regression/test_outline04.rb
write_xlsx-0.72.0 test/regression/test_outline04.rb
write_xlsx-0.71.0 test/regression/test_outline04.rb
write_xlsx-0.70.0 test/regression/test_outline04.rb
write_xlsx-0.69.0 test/regression/test_outline04.rb
write_xlsx-0.65.1 test/regression/test_outline04.rb
write_xlsx-0.65.0 test/regression/test_outline04.rb
write_xlsx-0.64.1 test/regression/test_outline04.rb
write_xlsx-0.64.0 test/regression/test_outline04.rb
write_xlsx-0.62.0 test/regression/test_outline04.rb
write_xlsx-0.61.0 test/regression/test_outline04.rb
write_xlsx-0.60.0 test/regression/test_outline04.rb
write_xlsx-0.59.0 test/regression/test_outline04.rb
write_xlsx-0.58.0 test/regression/test_outline04.rb
write_xlsx-0.57.0 test/regression/test_outline04.rb
write_xlsx-0.56.0 test/regression/test_outline04.rb
write_xlsx-0.55.0 test/regression/test_outline04.rb