Sha256: 0a3f5ff4deaffa17713eb8b181c5c524af273d05b687b9a4ca35dce49c4165fb

Contents?: true

Size: 1.42 KB

Versions: 19

Compression:

Stored size: 1.42 KB

Contents

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

class TestRegressionOutline04 < Minitest::Test
  def setup
    setup_dir_var
  end

  def teardown
    @tempfile.close(true)
  end

  def test_outline04
    @xlsx = 'outline04.xlsx'
    workbook    = WriteXLSX.new(@io)
    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_for_regression(
      [
        'xl/calcChain.xml',
        '[Content_Types].xml',
        'xl/_rels/workbook.xml.rels'
      ],
      {
        'xl/workbook.xml' => ['<workbookView']
      }
    )
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
write_xlsx-1.09.4 test/regression/test_outline04.rb
write_xlsx-1.09.3 test/regression/test_outline04.rb
write_xlsx-1.09.2 test/regression/test_outline04.rb
write_xlsx-1.09.1 test/regression/test_outline04.rb
write_xlsx-1.09.0 test/regression/test_outline04.rb
write_xlsx-1.08.2 test/regression/test_outline04.rb
write_xlsx-1.08.1 test/regression/test_outline04.rb
write_xlsx-1.08.0 test/regression/test_outline04.rb
write_xlsx-1.07.0 test/regression/test_outline04.rb
write_xlsx-1.04.0 test/regression/test_outline04.rb
write_xlsx-1.02.0 test/regression/test_outline04.rb
write_xlsx-1.01.0 test/regression/test_outline04.rb
write_xlsx-1.00.0 test/regression/test_outline04.rb
write_xlsx-0.99.0 test/regression/test_outline04.rb
write_xlsx-0.97.0 test/regression/test_outline04.rb
write_xlsx-0.90.0 test/regression/test_outline04.rb
write_xlsx-0.89.0 test/regression/test_outline04.rb
write_xlsx-0.88.0 test/regression/test_outline04.rb
write_xlsx-0.87.0 test/regression/test_outline04.rb