From: Antoine Musso Date: Sat, 27 Nov 2010 11:29:23 +0000 (+0000) Subject: Test normalizeForSearch and commafy X-Git-Tag: 1.31.0-rc.0~33719 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=851b89a76671f0728517b41d7b4100dbf01d26ab;p=lhc%2Fweb%2Fwiklou.git Test normalizeForSearch and commafy See bug 23156 and r64981 --- diff --git a/maintenance/tests/phpunit/languages/LanguageBe_taraskTest.php b/maintenance/tests/phpunit/languages/LanguageBe_taraskTest.php new file mode 100644 index 0000000000..bf01e14ab7 --- /dev/null +++ b/maintenance/tests/phpunit/languages/LanguageBe_taraskTest.php @@ -0,0 +1,31 @@ +lang = Language::factory( 'Be_tarask' ); + } + function tearDown() { + unset( $this->lang ); + } + + /** see bug 23156 & r64981 */ + function testSearchRightSingleQuotationMarkAsApostroph() { + $this->assertEquals( + "'", + $this->lang->normalizeForSearch( '’' ), + 'bug 23156: U+2019 conversion to U+0027' + ); + } + /** see bug 23156 & r64981 */ + function testCommafy() { + $this->assertEquals( '1,234,567', $this->lang->commafy( '1234567' ) ); + $this->assertEquals( '12,345', $this->lang->commafy( '12345' ) ); + } + /** see bug 23156 & r64981 */ + function testDoesNotCommafyFourDigitsNumber() { + $this->assertEquals( '1234', $this->lang->commafy( '1234' ) ); + } +}