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