Added additional tests for control chars.

Issue #42
This commit is contained in:
John McNamara 2015-12-21 00:10:36 +00:00
parent 05af1bd4b1
commit b256e2fd40
5 changed files with 56 additions and 0 deletions

View 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;
}

View 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;
}

View file

@ -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')

Binary file not shown.

Binary file not shown.