Sha256: c6ae6b5e8e55fc160516e29cec49a8c1a74c6c4f3fd73a7c281b9ca0d66c505c

Contents?: true

Size: 1.28 KB

Versions: 32

Compression:

Stored size: 1.28 KB

Contents

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

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

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

  def test_shape_stencil01
    @xlsx = 'shape_stencil01.xlsx'
    workbook    = WriteXLSX.new(@xlsx)
    worksheet   = workbook.add_worksheet
    worksheet.hide_gridlines(2)

    format      = workbook.add_format(:font => 'Arial', :size => 8)
    shape       = workbook.add_shape(
                                     :type   => 'rect',
                                     :width  => 90,
                                     :height => 90,
                                     :format => format
                                     )

    (1..10).each do |n|
      # Change the last 5 rectangles to stars.
      # Previously inserted shapes stay as rectangles
      shape.type = 'star5' if n == 6
      text = shape.type
      shape.text = [text, n.to_s].join(' ')
      worksheet.insert_shape('A1', shape, n * 100, 50)
    end

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

Version data entries

32 entries across 32 versions & 1 rubygems

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