Sha256: 0009c86e4c019df55b37ef060e4168896fe52de712f51635b6c9a1cf032cad5c

Contents?: true

Size: 846 Bytes

Versions: 6

Compression:

Stored size: 846 Bytes

Contents

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

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

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

  def test_button07
    @xlsx = 'button07.xlsm'
    workbook  = WriteXLSX.new(@xlsx)
    worksheet = workbook.add_worksheet

    workbook.set_vba_name('ThisWorkbook')
    worksheet.set_vba_name('Sheet1')

    workbook.set_vba_name
    worksheet.set_vba_name

    worksheet.insert_button('C2', {
                              :macro   => 'say_hello',
                              :caption => 'Hello'
                            }
                            )

    workbook.add_vba_project(File.join(@regression_output, 'vbaProject02.bin'))

    workbook.close
    compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
write_xlsx-0.85.5 test/regression/test_button07.rb
write_xlsx-0.85.4 test/regression/test_button07.rb
write_xlsx-0.85.3 test/regression/test_button07.rb
write_xlsx-0.85.2 test/regression/test_button07.rb
write_xlsx-0.85.1 test/regression/test_button07.rb
write_xlsx-0.83.0 test/regression/test_button07.rb