Sha256: e3b07f146ca7ba598ad0a2f5578c460ba83bde0bde40459931de7721947faf69

Contents?: true

Size: 1.26 KB

Versions: 18

Compression:

Stored size: 1.26 KB

Contents

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

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

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

  def test_escapes01
    @xlsx = 'escapes01.xlsx'
    workbook    = WriteXLSX.new(@xlsx)
    worksheet   = workbook.add_worksheet('5&4')

    worksheet.write_formula('A1', %q{=IF(1>2,0,1)},            nil, 1)
    worksheet.write_formula('A2', %q{=CONCATENATE("'","<>&")}, nil, %q{'<>&})
    worksheet.write_formula('A3', %q{=1&"b"},                  nil, %q{1b})
    worksheet.write_formula('A4', %q{="'"},                    nil, %q{'})
    worksheet.write_formula('A5', %q{=""""},                   nil, %q{"})
    worksheet.write_formula('A6', %q{="&" & "&"},              nil, %q{&&})

    worksheet.write_string('A8', %q{"&<>})

    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

18 entries across 18 versions & 1 rubygems

Version Path
write_xlsx-0.85.5 test/regression/test_escapes01.rb
write_xlsx-0.85.4 test/regression/test_escapes01.rb
write_xlsx-0.85.3 test/regression/test_escapes01.rb
write_xlsx-0.85.2 test/regression/test_escapes01.rb
write_xlsx-0.85.1 test/regression/test_escapes01.rb
write_xlsx-0.83.0 test/regression/test_escapes01.rb
write_xlsx-0.81.1 test/regression/test_escapes01.rb
write_xlsx-0.81.0 test/regression/test_escapes01.rb
write_xlsx-0.80.0 test/regression/test_escapes01.rb
write_xlsx-0.79.0 test/regression/test_escapes01.rb
write_xlsx-0.78.0 test/regression/test_escapes01.rb
write_xlsx-0.77.2 test/regression/test_escapes01.rb
write_xlsx-0.77.1 test/regression/test_escapes01.rb
write_xlsx-0.77.0 test/regression/test_escapes01.rb
write_xlsx-0.76.3 test/regression/test_escapes01.rb
write_xlsx-0.76.2 test/regression/test_escapes01.rb
write_xlsx-0.76.1 test/regression/test_escapes01.rb
write_xlsx-0.76.0 test/regression/test_escapes01.rb