From 76632978617847069cfea5cb2024054b163e3e69 Mon Sep 17 00:00:00 2001 From: Arlo Breault Date: Thu, 15 Jul 2021 15:39:26 -0400 Subject: [PATCH] Sync up with Parsoid imageMapParserTests.txt This now aligns with Parsoid commit 10b44f6c0b6a38fb129a0deb39b98b196508ebe3 Change-Id: I29b89066e666dd0e552a2d30315a116153b58d5f --- tests/parser/imageMapParserTests.txt | 109 ++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 2 deletions(-) diff --git a/tests/parser/imageMapParserTests.txt b/tests/parser/imageMapParserTests.txt index 6172d5e..bd2634b 100644 --- a/tests/parser/imageMapParserTests.txt +++ b/tests/parser/imageMapParserTests.txt @@ -10,8 +10,10 @@ imagemap test 1 Image:Foobar.jpg -!! html +!! html/php
Foobar.jpg
About this image
+!! html/parsoid +

!! end !! test @@ -22,6 +24,109 @@ File:Foobar.jpg poly 10.1 10.9 10 30 -30 15 [[Main Page]] -!! html +!! html/php
Main PageFoobar.jpg
About this image
+!! html/parsoid +

+!! end + +!! test +imagemap test 3 +!! wikitext + +File:Foobar.jpg|150px|alt=Alt text +default [[Main Page|Go to main page]] + +!! html/php +
Alt text
About this image
+!! html/parsoid +

Alt text

+!! end + +!! test +Empty imagemap +!! wikitext + + +!! html/php +

Error: Must specify an image in the first line.

+!! html/parsoid +

Error: imagemap_no_image

+!! end + +!! test +Invalid image title +!! wikitext + +[[x|xx]]]] + +!! html/php +

Error: Must specify an image in the first line.

+!! html/parsoid +

Error: imagemap_no_image

+!! end + +!! test +Image does not exist +!! wikitext + +File:Nopenopenope.jpg + +!! html/php +

Error: Image is invalid or non-existent.

+!! html/parsoid +

Error: imagemap_invalid_image

+!! end + +!! test +Invalid description type +!! wikitext + +Image:Foobar.jpg +desc nopenopenope + +!! html/php +

Error: Invalid desc specification, must be one of: top-right, bottom-right, bottom-left, top-left, none.

+!! html/parsoid +

Error: imagemap_invalid_desc

+!! end + +!! test +No link title +!! wikitext + +File:Foobar.jpg +123 + +!! html/php +

Error: No valid link was found at the end of line 3.

+!! html/parsoid +

Error: imagemap_no_link

+!! end + +!! test +Invalid link title +!! wikitext + +File:Foobar.jpg +[[<]] + +!! html/php +

Error: Invalid title in link at line 3.

+!! html/parsoid +

Error: imagemap_invalid_title

+!! end + +## FIXME: Note the difference in the link alt +!! test +Link with wikitext syntax in content +!! wikitext + +File:Foobar.jpg|150px|alt=Alt text +default [[Main Page|Go to ''main page'']] + +!! html/php +
Alt text
About this image
+!! html/parsoid +

Alt text

!! end