Make WordPress Core


Ignore:
Timestamp:
01/14/2013 01:43:47 AM (14 years ago)
Author:
SergeyBiryukov
Message:

wptexturize() test for non-breaking spaces around hyphens. props redsweater. see #23185.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/formatting/WPTexturize.php

    r1168 r1185  
    180180                $this->assertEquals( 'WordPress 3.5’s release date', wptexturize( "WordPress 3.5's release date" ) );
    181181        }
     182
     183        /**
     184         * @ticket 23185
     185         */
     186        function test_spaces_around_hyphens() {
     187                $this->assertEquals( ' – ', wptexturize( ' - ' ) );
     188                $this->assertEquals( ' – ', wptexturize( ' - ' ) );
     189                $this->assertEquals( ' – ', wptexturize( ' - ' ) );
     190                $this->assertEquals( ' – ', wptexturize( ' - ') );
     191
     192                $this->assertEquals( ' — ', wptexturize( ' -- ' ) );
     193                $this->assertEquals( ' — ', wptexturize( ' -- ' ) );
     194                $this->assertEquals( ' — ', wptexturize( ' -- ' ) );
     195                $this->assertEquals( ' — ', wptexturize( ' -- ') );
     196        }
    182197}
Note: See TracChangeset for help on using the changeset viewer.