WordPress.org

Make WordPress Core

Changeset 759 in tests


Ignore:
Timestamp:
06/30/2012 05:26:55 PM (9 years ago)
Author:
nacin
Message:

Merge r757 r758 to legacy branch.

Location:
branches/legacy
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/legacy

  • branches/legacy/wp-testcase/test_includes_formatting.php

    r727 r759  
    165165            'blah blah http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software).) blah blah',
    166166            'blah blah http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software).)moreurl blah blah',
     167            'In his famous speech “You and Your research” (here:
     168            http://www.cs.virginia.edu/~robins/YouAndYourResearch.html)
     169            Richard Hamming wrote about people getting more done with their doors closed, but',
    167170        );
    168171        $urls_expected = array(
     
    176179            'blah blah <a href="http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)" rel="nofollow">http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)</a>.) blah blah',
    177180            'blah blah <a href="http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)" rel="nofollow">http://en.wikipedia.org/wiki/PC_Tools_(Central_Point_Software)</a>.)moreurl blah blah',
     181            'In his famous speech “You and Your research” (here:
     182            <a href="http://www.cs.virginia.edu/~robins/YouAndYourResearch.html" rel="nofollow">http://www.cs.virginia.edu/~robins/YouAndYourResearch.html</a>)
     183            Richard Hamming wrote about people getting more done with their doors closed, but',
    178184        );
    179185        foreach ($urls_before as $key => $url) {
     
    560566        $this->assertEquals('&#8220;a 9&#8242; b&#8221;', wptexturize('"a 9\' b"'));
    561567        $this->assertEquals('&#8216;a 9&#8243; b&#8217;', wptexturize("'a 9\" b'"));
     568    }
     569
     570    function test_wptexturize_quotes_around_numbers() {
     571        $this->knownWPBug(8775);
     572        $this->assertEquals('&#8220;12345&#8221;', wptexturize('"12345"'));
     573        $this->assertEquals('&#8216;12345&#8217;', wptexturize('\'12345\''));
     574        $this->assertEquals('&#8220;a 9&#8242; plus a &#8216;9&#8217;, maybe a 9&#8242; &#8216;9&#8217; &#8221;', wptexturize('"a 9\' plus a \'9\', maybe a 9\' \'9\' "'));
     575        $this->assertEquals('<p>&#8216;99<br />&#8216;123&#8217;<br />&#8217;tis<br />&#8216;s&#8217;</p>', wptexturize('<p>\'99<br />\'123\'<br />\'tis<br />\'s\'</p>'));
     576    }
     577
     578    function test_wptexturize_html_comments() {
     579        $this->knownWPBug(8912);
     580        $this->assertEquals('<!--[if !IE]>--><!--<![endif]-->', wptexturize('<!--[if !IE]>--><!--<![endif]-->'));
     581        $this->assertEquals('<!--[if !IE]>"a 9\' plus a \'9\', maybe a 9\' \'9\' "<![endif]-->', wptexturize('<!--[if !IE]>"a 9\' plus a \'9\', maybe a 9\' \'9\' "<![endif]-->'));
     582        $this->assertEquals('<ul><li>Hello.</li><!--<li>Goodbye.</li>--></ul>', wptexturize('<ul><li>Hello.</li><!--<li>Goodbye.</li>--></ul>'));
    562583    }
    563584
     
    14561477}
    14571478
     1479
    14581480?>
Note: See TracChangeset for help on using the changeset viewer.