Index: trunk/phase3/maintenance/parserTests.inc |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | */ |
27 | 27 | |
28 | 28 | /** */ |
29 | | -$options = array( 'quick', 'color', 'quiet', 'help' ); |
| 29 | +$options = array( 'quick', 'color', 'quiet', 'help', 'show-output' ); |
30 | 30 | $optionsWithArgs = array( 'regex' ); |
31 | 31 | |
32 | 32 | require_once( 'commandLine.inc' ); |
— | — | @@ -54,6 +54,11 @@ |
55 | 55 | var $lightcolor; |
56 | 56 | |
57 | 57 | /** |
| 58 | + * boolean $showOutput Show test output |
| 59 | + */ |
| 60 | + var $showOutput; |
| 61 | + |
| 62 | + /** |
58 | 63 | * Sets terminal colorization and diff/quick modes depending on OS and |
59 | 64 | * command-line options (--color and --quick). |
60 | 65 | * |
— | — | @@ -82,9 +87,10 @@ |
83 | 88 | } |
84 | 89 | |
85 | 90 | $this->showDiffs = !isset( $options['quick'] ); |
86 | | - |
87 | 91 | $this->quiet = isset( $options['quiet'] ); |
| 92 | + $this->showOutput = isset( $options['show-output'] ); |
88 | 93 | |
| 94 | + |
89 | 95 | if (isset($options['regex'])) { |
90 | 96 | $this->regex = $options['regex']; |
91 | 97 | } else { |
— | — | @@ -586,6 +592,9 @@ |
587 | 593 | $this->showTesting( $desc ); |
588 | 594 | } |
589 | 595 | print $this->termColor( '1;31' ) . 'FAILED!' . $this->termReset() . "\n"; |
| 596 | + if ( $this->showOutput ) { |
| 597 | + print "--- Expected ---\n$result\n--- Actual ---\n$html\n"; |
| 598 | + } |
590 | 599 | if( $this->showDiffs ) { |
591 | 600 | print $this->quickDiff( $result, $html ); |
592 | 601 | if( !$this->wellFormed( $html ) ) { |
Index: trunk/phase3/maintenance/parserTests.php |
— | — | @@ -26,22 +26,24 @@ |
27 | 27 | require('parserTests.inc'); |
28 | 28 | |
29 | 29 | if( isset( $options['help'] ) ) { |
30 | | - echo <<<END |
| 30 | + echo <<<ENDS |
31 | 31 | MediaWiki $wgVersion parser test suite |
32 | | -Usage: php parserTests.php [--quick] [--quiet] [--color[=(yes|no|light)]] |
| 32 | +Usage: php parserTests.php [--quick] [--quiet] [--show-output] |
| 33 | + [--color[=(yes|no|light)]] |
33 | 34 | [--regex=<expression>] [--file=<testfile>] |
34 | 35 | [--help] |
35 | 36 | Options: |
36 | | - --quick Suppress diff output of failed tests |
37 | | - --quiet Suppress notification of passed tests (shows only failed tests) |
38 | | - --color Override terminal detection and force color output on or off |
39 | | - 'light' option is similar to 'yes' but with color for dark backgrounds |
40 | | - --regex Only run tests whose descriptions which match given regex |
41 | | - --file Run test cases from a custom file instead of parserTests.txt |
42 | | - --help Show this help message |
| 37 | + --quick Suppress diff output of failed tests |
| 38 | + --quiet Suppress notification of passed tests (shows only failed tests) |
| 39 | + --show-output Show expected and actual output |
| 40 | + --color Override terminal detection and force color output on or off |
| 41 | + 'light' option is similar to 'yes' but with color for dark backgrounds |
| 42 | + --regex Only run tests whose descriptions which match given regex |
| 43 | + --file Run test cases from a custom file instead of parserTests.txt |
| 44 | + --help Show this help message |
43 | 45 | |
44 | 46 | |
45 | | -END; |
| 47 | +ENDS; |
46 | 48 | exit( 0 ); |
47 | 49 | } |
48 | 50 | |
Index: trunk/phase3/maintenance/parserTests.txt |
— | — | @@ -3136,8 +3136,6 @@ |
3137 | 3137 | ### |
3138 | 3138 | !! test |
3139 | 3139 | Basic section headings |
3140 | | -!! options |
3141 | | -title=[[Parser test script]] |
3142 | 3140 | !! input |
3143 | 3141 | == Headline 1 == |
3144 | 3142 | Some text |
— | — | @@ -3147,23 +3145,19 @@ |
3148 | 3146 | ===Smaller headline=== |
3149 | 3147 | Blah blah |
3150 | 3148 | !! result |
3151 | | -<a name="Headline_1"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span> <span class="mw-headline"> Headline 1 </span></h2> |
3152 | | - |
| 3149 | +<a name="Headline_1"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span> <span class="mw-headline"> Headline 1 </span></h2> |
3153 | 3150 | <p>Some text |
3154 | 3151 | </p> |
3155 | | -<a name="Headline_2"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Headline 2">edit</a>]</span> <span class="mw-headline">Headline 2</span></h2> |
| 3152 | +<a name="Headline_2"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Headline 2">edit</a>]</span> <span class="mw-headline">Headline 2</span></h2> |
3156 | 3153 | <p>More |
3157 | 3154 | </p> |
3158 | | -<a name="Smaller_headline"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=3" title="Edit section: Smaller headline">edit</a>]</span> <span class="mw-headline">Smaller headline</span></h3> |
| 3155 | +<a name="Smaller_headline"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Smaller headline">edit</a>]</span> <span class="mw-headline">Smaller headline</span></h3> |
3159 | 3156 | <p>Blah blah |
3160 | | - |
3161 | 3157 | </p> |
3162 | 3158 | !! end |
3163 | 3159 | |
3164 | 3160 | !! test |
3165 | 3161 | Section headings with TOC |
3166 | | -!! options |
3167 | | -title=[[Parser test script]] |
3168 | 3162 | !! input |
3169 | 3163 | == Headline 1 == |
3170 | 3164 | === Subheadline 1 === |
— | — | @@ -3174,8 +3168,7 @@ |
3175 | 3169 | Some text |
3176 | 3170 | ===Another headline=== |
3177 | 3171 | !! result |
3178 | | -<table id="toc" class="toc" summary="Contents"><tbody><tr><td><div id="toctitle"><h2>Contents</h2> <span class="toctoggle">[<a href="javascript:toggleToc()" class="internal" id="togglelink">hide</a>]</span></div> |
3179 | | - |
| 3172 | +<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div> |
3180 | 3173 | <ul> |
3181 | 3174 | <li class="toclevel-1"><a href="#Headline_1"><span class="tocnumber">1</span> <span class="toctext">Headline 1</span></a> |
3182 | 3175 | <ul> |
— | — | @@ -3184,7 +3177,6 @@ |
3185 | 3178 | <li class="toclevel-3"><a href="#Skipping_a_level"><span class="tocnumber">1.1.1</span> <span class="toctext">Skipping a level</span></a> |
3186 | 3179 | <ul> |
3187 | 3180 | <li class="toclevel-4"><a href="#Skipping_a_level_2"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Skipping a level</span></a></li> |
3188 | | - |
3189 | 3181 | </ul> |
3190 | 3182 | </li> |
3191 | 3183 | </ul> |
— | — | @@ -3196,19 +3188,17 @@ |
3197 | 3189 | <li class="toclevel-2"><a href="#Another_headline"><span class="tocnumber">2.1</span> <span class="toctext">Another headline</span></a></li> |
3198 | 3190 | </ul> |
3199 | 3191 | </li> |
3200 | | - |
3201 | 3192 | </ul> |
3202 | | -</td></tr></tbody></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
3203 | | -<a name="Headline_1"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span> <span class="mw-headline"> Headline 1 </span></h2> |
3204 | | -<a name="Subheadline_1"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Subheadline 1">edit</a>]</span> <span class="mw-headline"> Subheadline 1 </span></h3> |
3205 | | - |
3206 | | -<a name="Skipping_a_level"></a><h5><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=3" title="Edit section: Skipping a level">edit</a>]</span> <span class="mw-headline"> Skipping a level </span></h5> |
3207 | | -<a name="Skipping_a_level_2"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=4" title="Edit section: Skipping a level">edit</a>]</span> <span class="mw-headline"> Skipping a level </span></h6> |
3208 | | -<a name="Headline_2"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=5" title="Edit section: Headline 2">edit</a>]</span> <span class="mw-headline"> Headline 2 </span></h2> |
3209 | | - |
| 3193 | +</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
| 3194 | +<a name="Headline_1"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Headline 1">edit</a>]</span> <span class="mw-headline"> Headline 1 </span></h2> |
| 3195 | +<a name="Subheadline_1"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Subheadline 1">edit</a>]</span> <span class="mw-headline"> Subheadline 1 </span></h3> |
| 3196 | +<a name="Skipping_a_level"></a><h5><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Skipping a level">edit</a>]</span> <span class="mw-headline"> Skipping a level </span></h5> |
| 3197 | +<a name="Skipping_a_level_2"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Skipping a level">edit</a>]</span> <span class="mw-headline"> Skipping a level </span></h6> |
| 3198 | +<a name="Headline_2"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Headline 2">edit</a>]</span> <span class="mw-headline"> Headline 2 </span></h2> |
3210 | 3199 | <p>Some text |
3211 | 3200 | </p> |
3212 | | -<a name="Another_headline"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=6" title="Edit section: Another headline">edit</a>]</span> <span class="mw-headline">Another headline</span></h3> |
| 3201 | +<a name="Another_headline"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Another headline">edit</a>]</span> <span class="mw-headline">Another headline</span></h3> |
| 3202 | + |
3213 | 3203 | !! end |
3214 | 3204 | |
3215 | 3205 | # perl -e 'print "="x$_," Level $_ heading","="x$_,"\n" for 1..10' |
— | — | @@ -3226,8 +3216,7 @@ |
3227 | 3217 | ========= Level 9 Heading========= |
3228 | 3218 | ========== Level 10 Heading========== |
3229 | 3219 | !! result |
3230 | | -<table id="toc" class="toc" summary="Contents"><tbody><tr><td><div id="toctitle"><h2>Contents</h2> <span class="toctoggle">[<a href="javascript:toggleToc()" class="internal" id="togglelink">hide</a>]</span></div> |
3231 | | - |
| 3220 | +<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div> |
3232 | 3221 | <ul> |
3233 | 3222 | <li class="toclevel-1"><a href="#Level_1_Heading"><span class="tocnumber">1</span> <span class="toctext">Level 1 Heading</span></a> |
3234 | 3223 | <ul> |
— | — | @@ -3236,14 +3225,12 @@ |
3237 | 3226 | <li class="toclevel-3"><a href="#Level_3_Heading"><span class="tocnumber">1.1.1</span> <span class="toctext">Level 3 Heading</span></a> |
3238 | 3227 | <ul> |
3239 | 3228 | <li class="toclevel-4"><a href="#Level_4_Heading"><span class="tocnumber">1.1.1.1</span> <span class="toctext">Level 4 Heading</span></a> |
3240 | | - |
3241 | 3229 | <ul> |
3242 | 3230 | <li class="toclevel-5"><a href="#Level_5_Heading"><span class="tocnumber">1.1.1.1.1</span> <span class="toctext">Level 5 Heading</span></a> |
3243 | 3231 | <ul> |
3244 | 3232 | <li class="toclevel-6"><a href="#Level_6_Heading"><span class="tocnumber">1.1.1.1.1.1</span> <span class="toctext">Level 6 Heading</span></a></li> |
3245 | 3233 | <li class="toclevel-6"><a href="#.3D_Level_7_Heading.3D"><span class="tocnumber">1.1.1.1.1.2</span> <span class="toctext">= Level 7 Heading=</span></a></li> |
3246 | 3234 | <li class="toclevel-6"><a href="#.3D.3D_Level_8_Heading.3D.3D"><span class="tocnumber">1.1.1.1.1.3</span> <span class="toctext">== Level 8 Heading==</span></a></li> |
3247 | | - |
3248 | 3235 | <li class="toclevel-6"><a href="#.3D.3D.3D_Level_9_Heading.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.4</span> <span class="toctext">=== Level 9 Heading===</span></a></li> |
3249 | 3236 | <li class="toclevel-6"><a href="#.3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"><span class="tocnumber">1.1.1.1.1.5</span> <span class="toctext">==== Level 10 Heading====</span></a></li> |
3250 | 3237 | </ul> |
— | — | @@ -3255,36 +3242,31 @@ |
3256 | 3243 | </ul> |
3257 | 3244 | </li> |
3258 | 3245 | </ul> |
3259 | | - |
3260 | 3246 | </li> |
3261 | 3247 | </ul> |
3262 | | -</td></tr></tbody></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
3263 | | -<a name="Level_1_Heading"></a><h1><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a>]</span> <span class="mw-headline"> Level 1 Heading</span></h1> |
3264 | | -<a name="Level_2_Heading"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a>]</span> <span class="mw-headline"> Level 2 Heading</span></h2> |
| 3248 | +</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
| 3249 | +<a name="Level_1_Heading"></a><h1><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Level 1 Heading">edit</a>]</span> <span class="mw-headline"> Level 1 Heading</span></h1> |
| 3250 | +<a name="Level_2_Heading"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Level 2 Heading">edit</a>]</span> <span class="mw-headline"> Level 2 Heading</span></h2> |
| 3251 | +<a name="Level_3_Heading"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a>]</span> <span class="mw-headline"> Level 3 Heading</span></h3> |
| 3252 | +<a name="Level_4_Heading"></a><h4><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a>]</span> <span class="mw-headline"> Level 4 Heading</span></h4> |
| 3253 | +<a name="Level_5_Heading"></a><h5><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a>]</span> <span class="mw-headline"> Level 5 Heading</span></h5> |
| 3254 | +<a name="Level_6_Heading"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a>]</span> <span class="mw-headline"> Level 6 Heading</span></h6> |
| 3255 | +<a name=".3D_Level_7_Heading.3D"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=7" title="Edit section: = Level 7 Heading=">edit</a>]</span> <span class="mw-headline">= Level 7 Heading=</span></h6> |
| 3256 | +<a name=".3D.3D_Level_8_Heading.3D.3D"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=8" title="Edit section: == Level 8 Heading==">edit</a>]</span> <span class="mw-headline">== Level 8 Heading==</span></h6> |
| 3257 | +<a name=".3D.3D.3D_Level_9_Heading.3D.3D.3D"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=9" title="Edit section: === Level 9 Heading===">edit</a>]</span> <span class="mw-headline">=== Level 9 Heading===</span></h6> |
| 3258 | +<a name=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=10" title="Edit section: ==== Level 10 Heading====">edit</a>]</span> <span class="mw-headline">==== Level 10 Heading====</span></h6> |
3265 | 3259 | |
3266 | | -<a name="Level_3_Heading"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=3" title="Edit section: Level 3 Heading">edit</a>]</span> <span class="mw-headline"> Level 3 Heading</span></h3> |
3267 | | -<a name="Level_4_Heading"></a><h4><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=4" title="Edit section: Level 4 Heading">edit</a>]</span> <span class="mw-headline"> Level 4 Heading</span></h4> |
3268 | | -<a name="Level_5_Heading"></a><h5><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=5" title="Edit section: Level 5 Heading">edit</a>]</span> <span class="mw-headline"> Level 5 Heading</span></h5> |
3269 | | - |
3270 | | -<a name="Level_6_Heading"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=6" title="Edit section: Level 6 Heading">edit</a>]</span> <span class="mw-headline"> Level 6 Heading</span></h6> |
3271 | | -<a name=".3D_Level_7_Heading.3D"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=7" title="Edit section: = Level 7 Heading=">edit</a>]</span> <span class="mw-headline">= Level 7 Heading=</span></h6> |
3272 | | -<a name=".3D.3D_Level_8_Heading.3D.3D"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=8" title="Edit section: == Level 8 Heading==">edit</a>]</span> <span class="mw-headline">== Level 8 Heading==</span></h6> |
3273 | | - |
3274 | | -<a name=".3D.3D.3D_Level_9_Heading.3D.3D.3D"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=9" title="Edit section: === Level 9 Heading===">edit</a>]</span> <span class="mw-headline">=== Level 9 Heading===</span></h6> |
3275 | | -<a name=".3D.3D.3D.3D_Level_10_Heading.3D.3D.3D.3D"></a><h6><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=10" title="Edit section: ==== Level 10 Heading====">edit</a>]</span> <span class="mw-headline">==== Level 10 Heading====</span></h6> |
3276 | 3260 | !! end |
3277 | 3261 | |
3278 | 3262 | !! test |
3279 | 3263 | Resolving duplicate section names |
3280 | | -!! options |
3281 | | -title=[[Parser test script]] |
3282 | 3264 | !! input |
3283 | 3265 | == Foo bar == |
3284 | 3266 | == Foo bar == |
3285 | 3267 | !! result |
3286 | | -<a name="Foo_bar"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline"> Foo bar </span></h2> |
| 3268 | +<a name="Foo_bar"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline"> Foo bar </span></h2> |
| 3269 | +<a name="Foo_bar_2"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline"> Foo bar </span></h2> |
3287 | 3270 | |
3288 | | -<a name="Foo_bar_2"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline"> Foo bar </span></h2> |
3289 | 3271 | !! end |
3290 | 3272 | |
3291 | 3273 | !! article |
— | — | @@ -3296,20 +3278,17 @@ |
3297 | 3279 | |
3298 | 3280 | !! test |
3299 | 3281 | Template with sections, __NOTOC__ |
3300 | | -!! options |
3301 | | -title=[[Parser test script]] |
3302 | 3282 | !! input |
3303 | 3283 | __NOTOC__ |
3304 | 3284 | ==Section 0== |
3305 | 3285 | {{sections}} |
3306 | 3286 | ==Section 4== |
3307 | 3287 | !! result |
3308 | | -<a name="Section_0"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Section 0">edit</a>]</span> <span class="mw-headline">Section 0</span></h2> |
| 3288 | +<a name="Section_0"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section 0">edit</a>]</span> <span class="mw-headline">Section 0</span></h2> |
| 3289 | +<a name="Section_1"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Template:Sections&action=edit&section=1" title="Template:Sections">edit</a>]</span> <span class="mw-headline">Section 1</span></h3> |
| 3290 | +<a name="Section_2"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Template:Sections&action=edit&section=2" title="Template:Sections">edit</a>]</span> <span class="mw-headline">Section 2</span></h2> |
| 3291 | +<a name="Section_4"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Section 4">edit</a>]</span> <span class="mw-headline">Section 4</span></h2> |
3309 | 3292 | |
3310 | | -<a name="Section_1"></a><h3><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Template:Sections&action=edit&section=1" title="Template:Sections">edit</a>]</span> <span class="mw-headline">Section 1</span></h3> |
3311 | | -<a name="Section_2"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Template:Sections&action=edit&section=2" title="Template:Sections">edit</a>]</span> <span class="mw-headline">Section 2</span></h2> |
3312 | | -<a name="Section_4"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=2" title="Edit section: Section 4">edit</a>]</span> <span class="mw-headline">Section 4</span></h2> |
3313 | | - |
3314 | 3293 | !! end |
3315 | 3294 | |
3316 | 3295 | !! test |
— | — | @@ -3320,18 +3299,17 @@ |
3321 | 3300 | ==Section 2== |
3322 | 3301 | !! result |
3323 | 3302 | <a name="Section_1"></a><h2> <span class="mw-headline">Section 1</span></h2> |
3324 | | - |
3325 | 3303 | <a name="Section_2"></a><h2> <span class="mw-headline">Section 2</span></h2> |
| 3304 | + |
3326 | 3305 | !! end |
3327 | 3306 | |
3328 | 3307 | !! test |
3329 | 3308 | Link inside a section heading |
3330 | | -!! options |
3331 | | -title=[[Parser test script]] |
3332 | 3309 | !! input |
3333 | 3310 | ==Section with a [[Main Page|link]] in it== |
3334 | 3311 | !! result |
3335 | | -<a name="Section_with_a_link_in_it"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: Section with a link in it">edit</a>]</span> <span class="mw-headline">Section with a <a href="https://www.mediawiki.org/phase3/index.php/Main_Page" title="Main Page">link</a> in it</span></h2> |
| 3312 | +<a name="Section_with_a_link_in_it"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Section with a link in it">edit</a>]</span> <span class="mw-headline">Section with a <a href="https://www.mediawiki.org/wiki/Main_Page" title="Main Page">link</a> in it</span></h2> |
| 3313 | + |
3336 | 3314 | !! end |
3337 | 3315 | |
3338 | 3316 | |
— | — | @@ -4471,13 +4449,12 @@ |
4472 | 4450 | == onmouseover= == |
4473 | 4451 | http://__TOC__ |
4474 | 4452 | !! result |
4475 | | -<a name="onmouseover.3D"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: onmouseover=">edit</a>]</span> <span class="mw-headline"> onmouseover= </span></h2> |
4476 | | -http://<table id="toc" class="toc" summary="Contents"><tbody><tr><td><div id="toctitle"><h2>Contents</h2> <span class="toctoggle">[<a href="javascript:toggleToc()" class="internal" id="togglelink">hide</a>]</span></div> |
| 4453 | +<a name="onmouseover.3D"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: onmouseover=">edit</a>]</span> <span class="mw-headline"> onmouseover= </span></h2> |
| 4454 | +http://<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div> |
4477 | 4455 | <ul> |
4478 | 4456 | <li class="toclevel-1"><a href="#onmouseover.3D"><span class="tocnumber">1</span> <span class="toctext">onmouseover=</span></a></li> |
4479 | | - |
4480 | 4457 | </ul> |
4481 | | -</td></tr></tbody></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
| 4458 | +</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script> |
4482 | 4459 | |
4483 | 4460 | !! end |
4484 | 4461 | |
— | — | @@ -4487,10 +4464,11 @@ |
4488 | 4465 | ==a== |
4489 | 4466 | {| STYLE=__TOC__ |
4490 | 4467 | !! result |
4491 | | -<a name="a"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/phase3/index.php?title=Parser_test_script&action=edit&section=1" title="Edit section: a">edit</a>]</span> <span class="mw-headline">a</span></h2> |
4492 | | -<table style=""> |
4493 | | -<tbody><tr><td></td></tr> |
4494 | | -</tbody></table> |
| 4468 | +<a name="a"></a><h2><span class="editsection">[<a href="https://www.mediawiki.org/index.php?title=Parser_test&action=edit&section=1" title="Edit section: a">edit</a>]</span> <span class="mw-headline">a</span></h2> |
| 4469 | +<table style="__TOC__"> |
| 4470 | +<tr><td></td></tr> |
| 4471 | +</table> |
| 4472 | + |
4495 | 4473 | !! end |
4496 | 4474 | |
4497 | 4475 | # Known to produce bogus xml (extra </td>) |
— | — | @@ -5873,4 +5851,4 @@ |
5874 | 5852 | math |
5875 | 5853 | character entities |
5876 | 5854 | and much more |
5877 | | -Try for 100% code coverage |
\ No newline at end of file |
| 5855 | +Try for 100% code coverage |