Sha256: 1b5698edfbf23471087d9eb4fb3a67cfa5002862a3f0d52629ecf7add8845258

Contents?: true

Size: 1 KB

Versions: 49

Compression:

Stored size: 1 KB

Contents

# -*- coding: utf-8 -*-
require 'helper'
require 'write_xlsx/workbook'
require 'write_xlsx/worksheet'
require 'write_xlsx/shape'
require 'write_xlsx/drawing'
require 'stringio'

class DrawingShape06 < Test::Unit::TestCase
  def setup
    @workbook = WriteXLSX.new(StringIO.new)
    @worksheet = @workbook.add_worksheet('')
  end

  def test_drawing_shape_06
    shape = Writexlsx::Shape.new
    shape.adjustments = -10, 100, 20

    @obj = Writexlsx::Drawing.new
    @obj.embedded = 1

    @obj.add_drawing_object(
                            3, 4, 8, 209550, 95250, 12, 22, 209660,
                            96260, 10000, 20000, 95250, 190500, '', shape
                            )
    @obj.__send__(:write_a_av_lst, shape)

    result = got_to_array(@obj.xml_str)
    expected = expected_to_array(expected_str)
    assert_equal(expected, result)
  end

  def expected_str
<<EOS
<a:avLst>
<a:gd name="adj" fmla="val -10000"/>
<a:gd name="adj" fmla="val 100000"/>
<a:gd name="adj" fmla="val 20000"/>
</a:avLst>
EOS
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
write_xlsx-0.77.0 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.76.3 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.76.2 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.76.1 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.76.0 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.75.0 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.74.0 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.73.0 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.72.3.beta1 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.72.2 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.72.1 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.72.0 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.71.0 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.70.0 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.69.0 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.65.1 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.65.0 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.64.1 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.64.0 test/drawing/test_drawing_shape_06.rb
write_xlsx-0.62.0 test/drawing/test_drawing_shape_06.rb