From 7de27cc16b9972536efe02694fec0c70cb65ac13 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 23 Sep 2004 02:31:18 +0000 Subject: [PATCH] Separate out the external links tests --- maintenance/parserTests.txt | 145 +++++++++++++++++++++++++++++------- 1 file changed, 117 insertions(+), 28 deletions(-) diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index a54620ca9a..a16d252c3c 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -170,61 +170,150 @@ asdfjkl ### External links ### !! test -External links 1-4 +External links: non-bracketed !! input Non-bracketed: http://example.com +!! result +

Non-bracketed: http://example.com +

+!! end +!! test +External links: numbered +!! input Numbered: [http://example.com] +!! result +

Numbered: [1] (http://example.com) +

+!!end +!! test +External links: specified text +!! input Specified text: [http://example.com link] +!! result +

Specified text: link (http://example.com) +

+!!end +!! test +External links: trail +!! input Trail (not sure if this is meant to work): [http://example.com link]s !! result -

Non-bracketed: http://example.com -

Numbered: [1] (http://example.com) -

Specified text: link (http://example.com) -

Trail (not sure if this is meant to work): links (http://example.com) +

Trail (not sure if this is meant to work): links (http://example.com)

!! end -# todo: enable these !! test -!! disabled -External links +External links: dollar sign in URL +!! input +http://example.com/1$2345 +!! result +

http://example.com/1$2345 +

+!! end + +!! test +External links: dollar sign in URL (named) +!! input +[http://example.com/1$2345] +!! result +

[1] (http://example.com/1$2345) +

+!!end + +!! test +External image !! input -Unrecognised characters (for no good reason): http://example.com/1$2345 [http://example.com/1$2345] External image: http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png +!! result +

External image: Ncwikicol.png +

+!! end + +!! test +External image from https +!! input External image from https: https://meta.wikimedia.org/upload/f/f1/Ncwikicol.png +!! result +

External image from https: Ncwikicol.png +

+!! end + +!! test +Link to non-http image, no img tag +!! input Link to non-http image, no img tag: ftp://example.com/test.jpg +!! result +

Link to non-http image, no img tag: ftp://example.com/test.jpg +

+!! end + +!! test +External links: terminating separator +!! input Terminating separator: http://example.com/thing, +!! result +

Terminating separator: http://example.com/thing, +

+!! end + +!! test +External links: intervening separator +!! input Intervening separator: http://example.com/1,2,3 +!! result +

Intervening separator: http://example.com/1,2,3 +

+!! end + +!! test +External links: old bug with URL in query +!! input Old bug with URL in query: [http://example.com/thing?url=http://example.com link] +!! result +

Old bug with URL in query: link (http://example.com/thing?url=http://example.com) +

+!! end + +!! test +External links: old URL-in-URL bug, mixed protocols +!! input And again with mixed protocols: [ftp://example.com?url=http://example.com link] +!! result +

And again with mixed protocols: link (ftp://example.com?url=http://example.com) +

+!!end + +!! test +External links: URL in text +!! input URL in text: [http://example.com http://example.com] +!! result +

URL in text: http://example.com +

+!! end + +!! test +External links: Clickable images +!! input ja-style clickable images: [http://example.com http://meta.wikimedia.org/upload/f/f1/Ncwikicol.png] +!! result +

ja-style clickable images: Ncwikicol.png (http://example.com) +

+!!end + +!! test +External links: raw ampersand +!! input Old & use: http://x&y -Escaping without &: http://x&y !! result -

Unrecognised characters (for no good reason): http://example.com/1$2345 -[http://example.com/1$2345]

-

External image: test.jpg

-

External image from https: test.jpg

-

Link to non-http image, no img tag: ftp://example.com/test.jpg

-

Terminating separator: http://example.com/thing,

-

Intervening separator: http://example.com/1,2,3

-

Old bug with URL in query: [http://example.com/thing?url=http://example.com -link]

-

And again with mixed protocols: [ftp://example.com?url=http://example.com -link]

-

URL in text: http://example.com (http://example.com)

-

ja-style clickable images: Ncwikicol.png (http://example.com)

-

Old & use: http://x&y

-

Escaping without &: http://x&y

+

Old & use: http://x&y +

!! end + ### ### Quotes ### -- 2.20.1