Sha256: 5ab01777e80f57c2a0f4007f36216be5f245da4ac2d8f8375033c9cf916563bd

Contents?: true

Size: 1.31 KB

Versions: 7

Compression:

Stored size: 1.31 KB

Contents

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

class TestRegressionFormulaResults01 < Test::Unit::TestCase
  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

7 entries across 7 versions & 1 rubygems

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