<br title=bar/>
<br title=bar/ >
!! html/php
-<p><br title="title" />
-<br title="title" />
+<p><br title="" />
+<br title="" />
<br />
<br title="bar" />
<br title="bar" />
</p>
!! end
+# Parsoid does not serialize to empty attribute syntax,
+# so wt2wt and html2wt cases are skipped
!! test
-Attribute test: no value
+Attribute test: no value (T54330)
+!! options
+parsoid=wt2html,html2html
!! wikitext
<font color>foo</font>
-!! html
-<p><font color="color">foo</font>
+!! html/php
+<p><font color="">foo</font>
</p>
+!! html/parsoid
+<p><font color="">foo</font></p>
!! end
!! test
'width' => '200',
'height' => '100',
'depth' => '50',
- 'square' => 'square',
+ 'square' => '',
)
</pre>
'width' => '200',
'height' => '100',
'depth' => '50',
- 'square' => 'square',
+ 'square' => '',
)
</pre>
<p>other stuff
<link rel="stylesheet" itemprop="hello" href="{{SERVER}}">
</div>
!! html
-<div itemscope="itemscope">
+<div itemscope="">
<p> <meta itemprop="hello" content="world" />
<meta http-equiv="refresh" content="5">
<meta itemprop="hello" content="5" />
</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
showindicators
!! wikitext
<indicator name="empty" />
-<indicator name></indicator>
+<indicator name="name"></indicator>
!! html
empty=
name=