--- /dev/null
+viewbox 0 0 200 200
+fill none stroke #ff0000 stroke-width 1 path 'M 100 100 L 109 109 '
+fill none stroke #ff0000 stroke-width 1 path 'M 100 100 L 100 300 '
+fill none stroke #ff0000 stroke-width 1 path 'M -3.40282e+38 -3.40282e+38 L 3.40282e+38 3.40282e+38 '
+fill none stroke #008000 stroke-width 1 path 'M 100 109 L 109 100 '
+fill none stroke #008000 stroke-width 1 path 'M 100 100 L 112.346 112.346 '
+fill none stroke #0000ff stroke-width 1 path 'M 100 104.5 L 109 104.5 '
+fill none stroke #0000ff stroke-width 1 path 'M 0 0 L 0 200 '
+fill #000000 stroke #112233 stroke-width 1 path 'M 100 100 '
+fill #000000 stroke #090909 stroke-width 1 path 'M 100 100 '
+fill #000000 stroke #112233 stroke-width 1 path 'M 100 100 '
+fill #000000 stroke #112233 stroke-width 1 path 'M 100 100 '
--- /dev/null
+<?xml version="1.0"?>
+<svg width="200" height="200" viewPort="0 0 200 200" version="1.1"
+ xmlns="http://www.w3.org/2000/svg">
+
+ <g transform="translate(100,100)">
+ <!-- smallest minimal point set is line from top left to bottom right -->
+ <polyline fill="none" stroke="red" points="0 0 9 9"/>
+
+ <!-- underflow -->
+ <polyline fill="none" stroke="red" points="1e-100-1e-100 0 200"/>
+
+ <!-- overflow -->
+ <polyline fill="none" stroke="red" points="-1e+39-1e+39+1e+39+1e+39"/>
+
+ <!-- really long and strange representations -->
+ <polyline fill="none" stroke="green" points="000000.0000E10 0.900000000000001e1 8.99999999e0-0.0"/>
+
+ <!-- very long numbers -->
+ <polyline fill="none" stroke="green" points="0,0,123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890e-298,0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001234567890e301"/>
+
+ <!-- missing point -->
+ <polyline fill="none" stroke="blue" points="0 4.5 9 4.5 0"/>
+
+ <!-- junk on the end -->
+ <polyline fill="none" stroke="blue" points=" -100-100-100+100-none"/>
+
+ <!-- missing digits -->
+ <polyline stroke="#123" points="0 0 ------9"/>
+ <polyline stroke="rgb(9,9,9)" points="0 0 .....9"/>
+ <polyline stroke="#112233" points="0 0 +e9 9"/>
+ <polyline stroke="#112233" points="0 0 .e9 9"/>
+
+ </g>
+</svg>
svgdecode()
{
- OUTF=$(basename ${1} .svg)
- CMPF=$(dirname ${1})/${OUTF}.mvg
+ LEAFNAME=$(basename ${1} .svg) # leaf name of the test file
+ CHECKNAME=$(dirname ${1})/${LEAFNAME}.mvg # name of comparison file
+ OUTNAME=${TEST_OUT}/${LEAFNAME}.mvg # name of the generated output file
+
echo "SVG:${1}" >> ${TEST_LOG}
- ${TEST_PATH}/test_decode_svg ${1} 1.0 ${TEST_OUT}/${OUTF}.mvg 2>> ${TEST_LOG}
+ ${TEST_PATH}/test_decode_svg ${1} 1.0 ${OUTNAME} 2>> ${TEST_LOG}
ECODE=$?
- echo "Exit code:${ECODE}" >> ${TEST_LOG}
if [ "${ECODE}" -gt 0 ];then
+ echo "Exit code:${ECODE}" >> ${TEST_LOG}
return ${ECODE}
fi
- if [ -f "${CMPF}" ]; then
- cmp ${CMPF} ${TEST_OUT}/${OUTF}.ppm >> ${TEST_LOG} 2>> ${TEST_LOG}
+ if [ -f "${CHECKNAME}" ]; then
+ cmp ${CHECKNAME} ${OUTNAME} >> ${TEST_LOG} 2>> ${TEST_LOG}
if [ "$?" -ne 0 ]; then
return 128
fi