Test for dupliate images with hyperlinks.

This commit is contained in:
John McNamara 2020-02-07 21:22:14 +00:00
parent d71a21eafb
commit 1b5493e660
4 changed files with 28 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

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

View file

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

Binary file not shown.