# -*- coding: utf-8 -*- require 'helper' class TestRegressionAutofilter06 < Test::Unit::TestCase def setup setup_dir_var end def teardown File.delete(@xlsx) if File.exist?(@xlsx) end def test_autofilter06 @xlsx = 'autofilter06.xlsx' workbook = WriteXLSX.new(@xlsx) worksheet = workbook.add_worksheet data = [] data_lines.split(/\n/).each { |line| data << line.split } # Create a blank cell in our test data. data[5][0] = '' worksheet.write('A1', headings) worksheet.autofilter('A1:D51') worksheet.filter_column('A', 'x == NonBlanks') # Hide the rows that don't match the filter criteria. row = 1 data.each do |row_data| region = row_data[0] if region != '' # Row is visible. else # Hide row. worksheet.set_row(row, nil, nil, 1) end worksheet.write(row, 0, row_data) row += 1 end workbook.close compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx, nil, {'xl/workbook.xml' => ['