mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
parent
05af1bd4b1
commit
b256e2fd40
5 changed files with 56 additions and 0 deletions
25
test/functional/src/test_gh42_01.c
Normal file
25
test/functional/src/test_gh42_01.c
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*****************************************************************************
|
||||
* Test cases for libxlsxwriter.
|
||||
*
|
||||
* Test to compare output against Excel files.
|
||||
*
|
||||
* Copyright 2014-2015, John McNamara, jmcnamara@cpan.org
|
||||
*
|
||||
*/
|
||||
|
||||
#include "xlsxwriter.h"
|
||||
|
||||
int main() {
|
||||
|
||||
lxw_workbook *workbook = new_workbook("test_gh42_01.xlsx");
|
||||
lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL);
|
||||
|
||||
char string[] = {0xe5, 0x9b, 0xbe, 0x14, 0xe5, 0x9b, 0xbe, 0x00};
|
||||
|
||||
worksheet_write_string(worksheet, 0, 0, string, NULL);
|
||||
|
||||
workbook_close(workbook);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
25
test/functional/src/test_gh42_02.c
Normal file
25
test/functional/src/test_gh42_02.c
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*****************************************************************************
|
||||
* Test cases for libxlsxwriter.
|
||||
*
|
||||
* Test to compare output against Excel files.
|
||||
*
|
||||
* Copyright 2014-2015, John McNamara, jmcnamara@cpan.org
|
||||
*
|
||||
*/
|
||||
|
||||
#include "xlsxwriter.h"
|
||||
|
||||
int main() {
|
||||
|
||||
lxw_workbook *workbook = new_workbook("test_gh42_02.xlsx");
|
||||
lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL);
|
||||
|
||||
char string[] = {0xe5, 0x9b, 0xbe, 0x20, 0xe5, 0x9b, 0xbe, 0x00};
|
||||
|
||||
worksheet_write_string(worksheet, 0, 0, string, NULL);
|
||||
|
||||
workbook_close(workbook);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -26,3 +26,9 @@ class TestCompareXLSXFiles(base_test_class.XLSXBaseTest):
|
|||
|
||||
def test_shared_strings01(self):
|
||||
self.run_exe_test('test_shared_strings01')
|
||||
|
||||
def test_gh42_01(self):
|
||||
self.run_exe_test('test_gh42_01')
|
||||
|
||||
def test_gh42_02(self):
|
||||
self.run_exe_test('test_gh42_02')
|
||||
|
|
|
|||
BIN
test/functional/xlsx_files/gh42_01.xlsx
Normal file
BIN
test/functional/xlsx_files/gh42_01.xlsx
Normal file
Binary file not shown.
BIN
test/functional/xlsx_files/gh42_02.xlsx
Normal file
BIN
test/functional/xlsx_files/gh42_02.xlsx
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue