| 1 | Index: tests/formatting/WPTexturize.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- tests/formatting/WPTexturize.php (revision 1183) |
|---|
| 4 | +++ tests/formatting/WPTexturize.php (working copy) |
|---|
| 5 | @@ -179,4 +179,22 @@ |
|---|
| 6 | function test_apostrophes_before_primes() { |
|---|
| 7 | $this->assertEquals( 'WordPress 3.5’s release date', wptexturize( "WordPress 3.5's release date" ) ); |
|---|
| 8 | } |
|---|
| 9 | + |
|---|
| 10 | + /** |
|---|
| 11 | + * @ticket 23185 |
|---|
| 12 | + */ |
|---|
| 13 | + function test_spaces_around_hyphens() { |
|---|
| 14 | + |
|---|
| 15 | + function performTests($tester, $hyphenString, $expectedTranslation) { |
|---|
| 16 | + $tester->assertEquals( ' ' . $expectedTranslation . ' ', wptexturize( ' ' . $hyphenString . ' ' ) ); |
|---|
| 17 | + $tester->assertEquals( ' ' . $expectedTranslation . ' ', wptexturize( ' ' . $hyphenString . ' ' ) ); |
|---|
| 18 | + $tester->assertEquals( ' ' . $expectedTranslation . ' ', wptexturize( ' ' . $hyphenString . ' ' ) ); |
|---|
| 19 | + $tester->assertEquals( ' ' . $expectedTranslation . ' ', wptexturize( ' ' . $hyphenString . ' ') ); |
|---|
| 20 | + } |
|---|
| 21 | + |
|---|
| 22 | + performTests($this, '-', '–'); |
|---|
| 23 | + performTests($this, '--', '—'); |
|---|
| 24 | + } |
|---|
| 25 | } |
|---|
| 26 | + |
|---|
| 27 | + |
|---|