Make WordPress Core

Ticket #20772: 20772.tests.patch

File 20772.tests.patch, 1.5 KB (added by SergeyBiryukov, 13 years ago)
  • wp-testcase/test_includes_formatting.php

     
    10821082                $this->assertEquals("6x7-is-42", sanitize_title_with_dashes("6×7 is 42", '', 'save'));
    10831083        }
    10841084
     1085        function test_replaces_standalone_diacritic() {
     1086                $this->knownWPBug(20772);
     1087                $this->assertEquals("aaaa", sanitize_title_with_dashes("āáǎà", '', 'save'));
     1088        }
     1089
    10851090}
    10861091
    10871092class TestConvertChars extends WPTestCase {
     
    13661371                // dot below
    13671372                $this->assertEquals( 'AaAaAaEeEeIiOoOoOoUuUuYy', remove_accents( 'ẠạẬậẶặẸẹỆệỊịỌọỘộỢợỤụỰựỴỵ' ) );
    13681373        }
     1374
     1375        public function test_remove_accents_hanyu_pinyin() {
     1376                $this->knownWPBug(20772);
     1377
     1378                // Vowels with diacritic (Chinese, Hanyu Pinyin)
     1379                // macron
     1380                $this->assertEquals( 'aeiouuAEIOUU', remove_accents( 'āēīōūǖĀĒĪŌŪǕ' ) );
     1381                // acute accent
     1382                $this->assertEquals( 'aeiouuAEIOUU', remove_accents( 'áéíóúǘÁÉÍÓÚǗ' ) );
     1383                // caron
     1384                $this->assertEquals( 'aeiouuAEIOUU', remove_accents( 'ǎěǐǒǔǚǍĚǏǑǓǙ' ) );
     1385                // grave accent
     1386                $this->assertEquals( 'aeiouuAEIOUU', remove_accents( 'àèìòùǜÀÈÌÒÙǛ' ) );
     1387                // unmarked
     1388                $this->assertEquals( 'aaeiouuAEIOUU', remove_accents( 'aɑeiouüAEIOUÜ' ) );
     1389        }
    13691390}
    13701391
    13711392class TestStripSlashesDeep extends WPTestCase {