r55406 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55405‎ | r55406 | r55407 >
Date:04:44, 21 August 2009
Author:philip
Status:ok
Tags:
Comment:
Add and modify parser test for new language converter rules.
Modified paths:
  • /trunk/phase3/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.txt
@@ -6897,16 +6897,34 @@
68986898
68996899
69006900 !! test
6901 -Adding explicit session-wise language variant mapping (A flag)
 6901+Explicit session-wise language variant mapping (A flag and - flag)
69026902 !! options
69036903 language=zh variant=zh-tw
69046904 !! input
6905 --{A|zh:China;zh-tw:Taiwan}- is China
 6905+Taiwan is not China.
 6906+But -{A|zh:China;zh-tw:Taiwan}- is China,
 6907+(This-{-|zh:China;zh-tw:Taiwan}- should be stripped!)
 6908+and -{China}- is China.
69066909 !! result
6907 -<p>Taiwan is Taiwan
 6910+<p>Taiwan is not China.
 6911+But Taiwan is Taiwan,
 6912+(This should be stripped!)
 6913+and China is China.
69086914 </p>
69096915 !! end
69106916
 6917+!! test
 6918+Explicit session-wise language variant mapping (H flag for hide)
 6919+!! options
 6920+language=zh variant=zh-tw
 6921+!! input
 6922+(This-{H|zh:China;zh-tw:Taiwan}- should be stripped!)
 6923+Taiwan is China.
 6924+!! result
 6925+<p>(This should be stripped!)
 6926+Taiwan is Taiwan.
 6927+</p>
 6928+!! end
69116929
69126930 !! test
69136931 Adding explicit conversion rule for title (T flag)

Status & tagging log