aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/data/refs/imagemap__--maptype__HTML__alt__svg.out4
-rw-r--r--tests/data/svg/alt.svg15
-rw-r--r--tests/test_imagemap_comparison.py1
3 files changed, 20 insertions, 0 deletions
diff --git a/tests/data/refs/imagemap__--maptype__HTML__alt__svg.out b/tests/data/refs/imagemap__--maptype__HTML__alt__svg.out
new file mode 100644
index 0000000..d78824d
--- /dev/null
+++ b/tests/data/refs/imagemap__--maptype__HTML__alt__svg.out
@@ -0,0 +1,4 @@
+<area shape=rect coords=25,20,75,30 href=http://example.com/1 alt=A>
+<area shape=rect coords=25,45,45,55 href=http://example.com/2 alt=B>
+<area shape=rect coords=55,45,75,55 href=http://example.com/2>
+<area shape=rect coords=25,70,75,80 href=http://example.com/3 alt=C>
diff --git a/tests/data/svg/alt.svg b/tests/data/svg/alt.svg
new file mode 100644
index 0000000..93aff8d
--- /dev/null
+++ b/tests/data/svg/alt.svg
@@ -0,0 +1,15 @@
+<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <a xlink:href="http://example.com/1">
+ <title>A</title>
+ <rect x="25" y="20" width="50" height="10"/>
+ </a>
+ <a xlink:href="http://example.com/2" xlink:title="B">
+ <title>A</title>
+ <rect x="25" y="45" width="20" height="10"/>
+ <rect x="55" y="45" width="20" height="10"/>
+ </a>
+ <a xlink:href="http://example.com/3" aria-label="C" xlink:title="B">
+ <title>A</title>
+ <rect x="25" y="70" width="50" height="10"/>
+ </a>
+</svg>
diff --git a/tests/test_imagemap_comparison.py b/tests/test_imagemap_comparison.py
index 994bc95..2dda137 100644
--- a/tests/test_imagemap_comparison.py
+++ b/tests/test_imagemap_comparison.py
@@ -4,6 +4,7 @@ from imagemap import ImageMap
class ImageMapComparisonTest(ComparisonMixin, TestCase):
effect_class = ImageMap
compare_file = (
+ 'svg/alt.svg',
'svg/enclave.svg',
'svg/fillstroke.svg',
'svg/image.svg',