Sha256: 0b7a03d127276565f18bb787849b95e0babbeb64dbb17d0737fa4ab8fca77562

Contents?: true

Size: 1.79 KB

Versions: 1

Compression:

Stored size: 1.79 KB

Contents

# frozen_string_literal: true

require_relative './xlsx_func_testcase'

class TestPrintOptions < XlsxWriterTestCase
  test 'print_options01' do |wb, t|
    t.ignore_elements = { 'xl/worksheets/sheet1.xml' => ['<pageMargins'] }
    ws = wb.add_worksheet
    ws.paper = 9
    ws.vertical_dpi = 200
    ws.gridlines = XlsxWriter::Worksheet::GRIDLINES_SHOW_PRINT
    ws.write_string(0, 'A', 'Foo', nil)
  end

  test 'print_options02' do |wb, t|
    t.ignore_elements = { 'xl/worksheets/sheet1.xml' => ['<pageMargins'] }
    ws = wb.add_worksheet
    ws.paper = 9
    ws.vertical_dpi = 200
    ws.center_horizontally
    ws.write_string(0, 'A', 'Foo', nil)
  end

  test 'print_options03' do |wb, t|
    t.ignore_elements = { 'xl/worksheets/sheet1.xml' => ['<pageMargins'] }
    ws = wb.add_worksheet
    ws.paper = 9
    ws.vertical_dpi = 200
    ws.center_vertically
    ws.write_string(0, 'A', 'Foo', nil)
  end

  test 'print_options04' do |wb, t|
    t.ignore_elements = { 'xl/worksheets/sheet1.xml' => ['<pageMargins'] }
    ws = wb.add_worksheet
    ws.paper = 9
    ws.vertical_dpi = 200
    ws.print_row_col_headers
    ws.write_string(0, 'A', 'Foo', nil)
  end

  test 'print_options05' do |wb, t|
    t.ignore_elements = { 'xl/worksheets/sheet1.xml' => ['<pageMargins'] }
    ws = wb.add_worksheet
    ws.paper = 9
    ws.vertical_dpi = 200
    ws.gridlines = XlsxWriter::Worksheet::GRIDLINES_SHOW_PRINT
    ws.center_horizontally
    ws.center_vertically
    ws.print_row_col_headers
    ws.write_string(0, 'A', 'Foo', nil)
  end

  test 'print_options06' do |wb, t|
    t.ignore_elements = { 'xl/worksheets/sheet1.xml' => ['<pageMargins'] }
    ws = wb.add_worksheet
    ws.paper = 9
    ws.vertical_dpi = 200
    ws.print_area(0, 'A', 19, 'G')
    ws.repeat_rows(0, 0)
    ws.write_string(0, 'A', 'Foo', nil)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
xlsxwriter-0.2.2 test/test_print_options.rb