diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2018-12-26 09:31:26 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2018-12-26 09:33:01 +0000 |
| commit | 7d268d0a116e4e29a23fce0e662bee4ad078bc05 (patch) | |
| tree | c5044f509a06a39a61df3654f864818f3dfbe2e4 /testfiles | |
| parent | Remove duplicate warnings of iconloader (diff) | |
| download | inkscape-7d268d0a116e4e29a23fce0e662bee4ad078bc05.tar.gz inkscape-7d268d0a116e4e29a23fce0e662bee4ad078bc05.zip | |
test missing image xlink:href attribute
Diffstat (limited to 'testfiles')
| -rw-r--r-- | testfiles/rendering_tests/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | testfiles/rendering_tests/expected_rendering/test-dont-crash.png | bin | 0 -> 453 bytes | |||
| -rw-r--r-- | testfiles/rendering_tests/test-dont-crash.svg | 22 | ||||
| -rwxr-xr-x | testfiles/rendering_tests/test.sh | 9 |
4 files changed, 30 insertions, 2 deletions
diff --git a/testfiles/rendering_tests/CMakeLists.txt b/testfiles/rendering_tests/CMakeLists.txt index 15a5eb15e..afe17ba96 100644 --- a/testfiles/rendering_tests/CMakeLists.txt +++ b/testfiles/rendering_tests/CMakeLists.txt @@ -13,6 +13,7 @@ set(RENDERING_TESTS test-rtl-vertical selector-important-002 selector-important-003 + test-dont-crash ) diff --git a/testfiles/rendering_tests/expected_rendering/test-dont-crash.png b/testfiles/rendering_tests/expected_rendering/test-dont-crash.png Binary files differnew file mode 100644 index 000000000..a2d005ed9 --- /dev/null +++ b/testfiles/rendering_tests/expected_rendering/test-dont-crash.png diff --git a/testfiles/rendering_tests/test-dont-crash.svg b/testfiles/rendering_tests/test-dont-crash.svg new file mode 100644 index 000000000..d01c0eaba --- /dev/null +++ b/testfiles/rendering_tests/test-dont-crash.svg @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.1" + viewBox="0 0 210 297" + height="297mm" + width="210mm"> + <g + id="layer1" + inkscape:groupmode="layer" + inkscape:label="Layer 1"> + <!-- missing xlink:href attribute - don't care how it's rendered (place it + off-page), but Inkscape should not crash --> + <image + y="-100" + x="-100" + height="50" + width="50" /> + </g> +</svg> diff --git a/testfiles/rendering_tests/test.sh b/testfiles/rendering_tests/test.sh index c899a321a..ab4605baf 100755 --- a/testfiles/rendering_tests/test.sh +++ b/testfiles/rendering_tests/test.sh @@ -19,23 +19,28 @@ testname=$(basename $test) compare -metric AE ${testname}.png ${EXPECTED}.png ${testname}-compare.png 2> .tmp test1=`cat .tmp` echo $test1 - if [ $test1 == 0 ]; then + if [ "$test1" == 0 ]; then echo ${testname} "PASSED" rm ${testname}.png ${testname}-compare.png else echo ${testname} "FAILED" exit_status=1 fi + +if [ -f "${EXPECTED}-large.png" ]; then ${INKSCAPE_EXE} --export-file=${testname}-large.png -d 384 ${test}.svg #2>/dev/null >/dev/null compare -metric AE ${testname}-large.png ${EXPECTED}-large.png ${testname}-compare-large.png 2>.tmp test2=`cat .tmp` - if [ $test2 == 0 ]; then + if [ "$test2" = 0 ]; then echo ${testname}-large "PASSED" rm ${testname}-large.png ${testname}-compare-large.png else echo ${testname}-large "FAILED" exit_status=1 fi +else + echo ${testname}-large "SKIPPED" +fi rm .tmp exit $exit_status |
