-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
149 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/***************************************************************************** | ||
* Test cases for libxlsxwriter. | ||
* | ||
* Test to compare output against Excel files. | ||
* | ||
* Copyright 2014-2015, John McNamara, [email protected] | ||
* | ||
*/ | ||
|
||
#include "xlsxwriter.h" | ||
|
||
int main() { | ||
|
||
lxw_workbook *workbook = new_workbook("test_escapes04.xlsx"); | ||
lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL); | ||
|
||
worksheet_write_url(worksheet, CELL("A1"), "http://www.perl.com/?a=1&b=2" , NULL); | ||
|
||
return workbook_close(workbook); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/***************************************************************************** | ||
* Test cases for libxlsxwriter. | ||
* | ||
* Test to compare output against Excel files. | ||
* | ||
* Copyright 2014-2015, John McNamara, [email protected] | ||
* | ||
*/ | ||
|
||
#include "xlsxwriter.h" | ||
|
||
int main() { | ||
|
||
lxw_workbook *workbook = new_workbook("test_escapes05.xlsx"); | ||
lxw_worksheet *worksheet1 = workbook_add_worksheet(workbook, "Start"); | ||
lxw_worksheet *worksheet2 = workbook_add_worksheet(workbook, "A & B"); | ||
|
||
(void)worksheet2; | ||
|
||
worksheet_write_url_opt(worksheet1, CELL("A1"), "internal:'A & B'!A1", NULL, "Jump to A & B" , NULL); | ||
|
||
return workbook_close(workbook); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/***************************************************************************** | ||
* Test cases for libxlsxwriter. | ||
* | ||
* Test to compare output against Excel files. | ||
* | ||
* Copyright 2014-2015, John McNamara, [email protected] | ||
* | ||
*/ | ||
|
||
#include "xlsxwriter.h" | ||
|
||
int main() { | ||
|
||
lxw_workbook *workbook = new_workbook("test_escapes06.xlsx"); | ||
lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL); | ||
lxw_format *num_format = workbook_add_format(workbook); | ||
|
||
format_set_num_format(num_format, "[Red]0.0%\\ \"a\""); | ||
|
||
worksheet_set_column(worksheet, 0, 0, 14, NULL, NULL); | ||
|
||
worksheet_write_number(worksheet, CELL("A1"), 123, num_format); | ||
|
||
return workbook_close(workbook); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/***************************************************************************** | ||
* Test cases for libxlsxwriter. | ||
* | ||
* Test to compare output against Excel files. | ||
* | ||
* Copyright 2014-2015, John McNamara, [email protected] | ||
* | ||
*/ | ||
|
||
#include "xlsxwriter.h" | ||
|
||
int main() { | ||
|
||
lxw_workbook *workbook = new_workbook("test_escapes07.xlsx"); | ||
lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL); | ||
|
||
worksheet_write_url(worksheet, CELL("A1"), "http://example.com/!\"$%&'( )*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~", NULL); | ||
|
||
return workbook_close(workbook); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/***************************************************************************** | ||
* Test cases for libxlsxwriter. | ||
* | ||
* Test to compare output against Excel files. | ||
* | ||
* Copyright 2014-2015, John McNamara, [email protected] | ||
* | ||
*/ | ||
|
||
#include "xlsxwriter.h" | ||
|
||
int main() { | ||
|
||
lxw_workbook *workbook = new_workbook("test_escapes08.xlsx"); | ||
lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL); | ||
|
||
/* Test an already escaped string. */ | ||
worksheet_write_url_opt(worksheet, CELL("A1"), "http://example.com/%5b0%5d", NULL, "http://example.com/[0]", NULL); | ||
|
||
return workbook_close(workbook); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
############################################################################### | ||
# | ||
# Tests for libxlsxwriter. | ||
# | ||
# Copyright 2014-2015, John McNamara, [email protected] | ||
# | ||
|
||
import base_test_class | ||
|
||
class TestCompareXLSXFiles(base_test_class.XLSXBaseTest): | ||
""" | ||
Test file created with libxlsxwriter against a file created by Excel. | ||
""" | ||
|
||
# def test_escapes01(self): | ||
# self.run_exe_test('test_escapes01') | ||
|
||
# def test_escapes02(self): | ||
# self.run_exe_test('test_escapes02') | ||
|
||
# def test_escapes03(self): | ||
# self.run_exe_test('test_escapes03') | ||
|
||
def test_escapes04(self): | ||
self.run_exe_test('test_escapes04') | ||
|
||
def test_escapes05(self): | ||
self.run_exe_test('test_escapes05') | ||
|
||
def test_escapes06(self): | ||
self.run_exe_test('test_escapes06') | ||
|
||
def test_escapes07(self): | ||
self.run_exe_test('test_escapes07') | ||
|
||
def test_escapes08(self): | ||
self.run_exe_test('test_escapes08') |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.