From 4e717c01589378893c98e333884315c166c217b3 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 7 Jul 2006 05:28:49 +0000 Subject: [PATCH] Add some more tests from Nick Jenkins --- maintenance/parserTests.txt | 221 ++++++++++++++++++++++++++++++++++++ 1 file changed, 221 insertions(+) diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index 0238051ceb..94f5b0b65d 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -5463,6 +5463,226 @@ Handling of in URLs !!end + +!! test +5 quotes, code coverage +1 line +!! input +''''' +!! result +!! end + +!! test +Special:Search page linking. +!! input +{{Special:search}} +!! result +

Special:Search +

+!! end + +!! test +Say the magic word +!! input +* {{PAGENAME}} +* {{BASEPAGENAME}} +* {{SUBPAGENAME}} +* {{SUBPAGENAMEE}} +* {{BASEPAGENAME}} +* {{BASEPAGENAMEE}} +* {{TALKPAGENAME}} +* {{TALKPAGENAMEE}} +* {{SUBJECTPAGENAME}} +* {{SUBJECTPAGENAMEE}} +* {{NAMESPACEE}} +* {{NAMESPACE}} +* {{TALKSPACE}} +* {{TALKSPACEE}} +* {{SUBJECTSPACE}} +* {{SUBJECTSPACEE}} +* {{Dynamic|{{NUMBEROFUSERS}}|{{NUMBEROFPAGES}}|{{CURRENTVERSION}}|{{CONTENTLANGUAGE}}|{{DIRECTIONMARK}}|{{CURRENTTIMESTAMP}}|{{NUMBEROFARTICLES}}}} +!! result + + +!! end +### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it generates a MySQL error when included. + +!! test +Gallery +!! input + +image1.png | +image2.gif||||| + +image3| +image4 |300px| centre + image5.svg| http:///////// +[[x|xx]]]] +* image6 + +!! result + + + + + + + + + +!! end + +!! test +HTML Hex character encoding. +!! input +JavaScript +!! result +

JavaScript +

+!! end + +!! test +__FORCETOC__ override +!! input +__NEWSECTIONLINK__ +__FORCETOC__ +!! result +


+

+!! end + +!! test +ISBN code coverage +!! input +ISBN 983 987 +!! result +

ISBN 983 987 +

+!! end + +!! test +ISBN followed by 5 spaces +!! input +ISBN +!! result +

ISBN +

+!! end + +!! test +Double ISBN +!! options +disabled # Disabled until Bug 6560 resolved +!! input +ISBN ISBN 1234 +!! result +

ISBN ISBN 1234 +

+!! end + +!! test +Double RFC +!! input +RFC RFC 1234 +!! result +

RFC RFC 1234 +

+!! end + +!! test +Double RFC with a wiki link +!! input +RFC [[RFC 1234 +!! result +

RFC [[RFC 1234 +

+!! end + +!! test +RFC code coverage +!! input +RFC 983 987 +!! result +

RFC 983 987 +

+!! end + +!! test +Centre-aligned image +!! input +[[Image:foobar.jpg|centre]] +!! result +
+ +!!end + +!! test +None-aligned image +!! input +[[Image:foobar.jpg|none]] +!! result +
+ +!!end + +!! test +Width + Height sized image (using px) (height is ignored) +!! input +[[Image:foobar.jpg|640x480px]] +!! result +

+

+!!end + +!! test +Another italics / bold test +!! input + ''' ''x' +!! result +
' x'
+
+!!end + +# Note the results may be incorrect, as parserTest output included this: +# XML error: Mismatched tag at byte 6120: +# ...
+
+
+ + + + + +!!end + # # # @@ -5473,3 +5693,4 @@ more tables math character entities and much more +Try for 100% code coverage -- 2.20.1