LanguageConverter fix of empty and numeric strings
[lhc/web/wiklou.git] / tests / parser / parserTests.txt
index e965352..18d9aa8 100644 (file)
@@ -18293,6 +18293,61 @@ Raw: -{R|zh:China;zh-tw:Taiwan}-
 </p>
 !! end
 
+!! test
+Strings evaluating false shouldn't be ignored by Language converter (T51072)
+!! options
+language=zh variant=zh-cn
+!! input
+-{zh-cn:0;zh-sg:1;zh-tw:2;zh-hk:3}-
+!! result
+<p>0
+</p>
+!! end
+
+!! test
+Conversion rules from [numeric-only string] to [something else] (T48634)
+!! options
+language=zh variant=zh-cn
+!! input
+-{H|0=>zh-cn:B}--{H|0=>zh-cn:C;0=>zh-cn:D}--{H|0=>zh-hans:A}-012345-{A|zh-tw:0;zh-cn:E;}-012345
+!! result
+<p>D12345EE12345
+</p>
+!! end
+
+!! test
+Bidirectional converter rule entries with an empty value should be ignored (T53551)
+!! options
+language=zh variant=zh-cn
+!! input
+-{H|zh-cn:foo;zh-tw:;}-foobar
+!! result
+<p>foobar
+</p>
+!! end
+
+!! test
+Unidirectional converter rule entries with an empty "from" string should be ignored (T53551)
+!! options
+language=zh variant=zh-cn
+!! input
+-{H|=>zh-cn:foo;}-foobar
+!! result
+<p>foobar
+</p>
+!! end
+
+!! test
+Empty converter rule entries shouldn't be inserted into the conversion table (T53551)
+!! options
+language=zh variant=zh-cn
+!! input
+-{H|}-foobar
+!! result
+<p>foobar
+</p>
+!! end
+
 !! test
 Nested using of manual convert syntax
 !! options