mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-21 06:45:21 -06:00
Test for dupliate images with hyperlinks.
This commit is contained in:
parent
d71a21eafb
commit
1b5493e660
4 changed files with 28 additions and 0 deletions
BIN
test/functional/src/images/red2.png
Normal file
BIN
test/functional/src/images/red2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 200 B |
24
test/functional/src/test_image51.c
Normal file
24
test/functional/src/test_image51.c
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/*****************************************************************************
|
||||
* Test cases for libxlsxwriter.
|
||||
*
|
||||
* Test to compare output against Excel files.
|
||||
*
|
||||
* Copyright 2014-2020, John McNamara, jmcnamara@cpan.org
|
||||
*
|
||||
*/
|
||||
|
||||
#include "xlsxwriter.h"
|
||||
|
||||
int main() {
|
||||
|
||||
lxw_workbook *workbook = workbook_new("test_image51.xlsx");
|
||||
lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL);
|
||||
|
||||
lxw_image_options options1 = {.url = "https://duckduckgo.com/?q=1"};
|
||||
lxw_image_options options2 = {.url = "https://duckduckgo.com/?q=2"};
|
||||
|
||||
worksheet_insert_image_opt(worksheet, CELL("E9"), "images/red.png", &options1);
|
||||
worksheet_insert_image_opt(worksheet, CELL("E13"), "images/red2.png", &options2);
|
||||
|
||||
return workbook_close(workbook);
|
||||
}
|
||||
|
|
@ -139,6 +139,10 @@ class TestCompareXLSXFiles(base_test_class.XLSXBaseTest):
|
|||
def test_image50(self):
|
||||
self.run_exe_test('test_image50')
|
||||
|
||||
@pytest.mark.skipif(os.environ.get('USE_NO_MD5'), reason="compiled without MD5 support")
|
||||
def test_image51(self):
|
||||
self.run_exe_test('test_image51')
|
||||
|
||||
# Test in-memory image handling.
|
||||
def test_image81(self):
|
||||
self.run_exe_test('test_image81', 'image01.xlsx')
|
||||
|
|
|
|||
BIN
test/functional/xlsx_files/image51.xlsx
Normal file
BIN
test/functional/xlsx_files/image51.xlsx
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue