WordPress.org

Make WordPress Core

Changeset 724 in tests


Ignore:
Timestamp:
05/29/2012 11:37:35 AM (6 years ago)
Author:
SergeyBiryukov
Message:

remove_accents() and sanitize_title_with_dashes() tests for Chinese (Hanyu Pinyin). see #WP20772.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_formatting.php

    r705 r724  
    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
     
    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
Note: See TracChangeset for help on using the changeset viewer.