Sha256: e36df1686d79dcaff70bd4ae59d44406369f9a048ba558c773bff6bbf78c7767

Contents?: true

Size: 1.31 KB

Versions: 19

Compression:

Stored size: 1.31 KB

Contents

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

class TestRegressionFormulaResults01 < Minitest::Test
  def setup
    setup_dir_var
  end

  def teardown
    @tempfile.close(true)
  end

  def test_formula_results01
    @xlsx = 'formula_results01.xlsx'
    workbook  = WriteXLSX.new(@io)
    worksheet = workbook.add_worksheet

    worksheet.write_formula('A1',  '1+1',                 nil, 2)
    worksheet.write_formula('A2',  '"Foo"',               nil, 'Foo')
    worksheet.write_formula('A3',  'IF(B3,FALSE,TRUE)',   nil, 'TRUE')
    worksheet.write_formula('A4',  'IF(B4,TRUE,FALSE)',   nil, 'FALSE')
    worksheet.write_formula('A5',  '#DIV/0!',             nil, '#DIV/0!')
    worksheet.write_formula('A6',  '#N/A',                nil, '#N/A')
    worksheet.write_formula('A7',  '#NAME?',              nil, '#NAME?')
    worksheet.write_formula('A8',  '#NULL!',              nil, '#NULL!')
    worksheet.write_formula('A9',  '#NUM!',               nil, '#NUM!')
    worksheet.write_formula('A10', '#REF!',               nil, '#REF!')
    worksheet.write_formula('A11', '#VALUE!',             nil, '#VALUE!')
    worksheet.write_formula('A12', '1/0',                 nil, '#DIV/0!')

    workbook.close
    compare_for_regression(
      [ 'xl/calcChain.xml', '[Content_Types].xml', 'xl/_rels/workbook.xml.rels' ],
      {}
    )
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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