// Test case that compares a file generated by excelwriter with a file // created by Excel. // // SPDX-License-Identifier: MIT OR Apache-2.0 Copyright 2022, John McNamara, // jmcnamara@cpan.org use excelwriter::Workbook; mod common; // Test case to demonstrate creating a basic file with 3 worksheets and no data. fn create_new_xlsx_file(filename: &str) { let mut workbook = Workbook::new(filename); let _ = workbook.add_worksheet(); let _ = workbook.add_worksheet(); let _ = workbook.add_worksheet(); workbook.close(); } #[test] fn bootstrap02_multiple_worksheets() { let testcase = "bootstrap02"; let (excel_file, xlsxwriter_file) = common::get_xlsx_filenames(testcase); create_new_xlsx_file(&xlsxwriter_file); common::assert_eq(&excel_file, &xlsxwriter_file); common::remove_test_xlsx_file(&xlsxwriter_file); }