From 851b89a76671f0728517b41d7b4100dbf01d26ab Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sat, 27 Nov 2010 11:29:23 +0000 Subject: [PATCH] Test normalizeForSearch and commafy See bug 23156 and r64981 --- .../languages/LanguageBe_taraskTest.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 maintenance/tests/phpunit/languages/LanguageBe_taraskTest.php 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' ) ); + } +} -- 2.20.1