WordPress.org

Make WordPress Core

Changeset 656 in tests


Ignore:
Timestamp:
04/09/12 20:24:33 (2 years ago)
Author:
markjaquith
Message:

Make sure manual HTML line breaks in <pre> sections are maintained by wpautop().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_includes_formatting.php

    r585 r656  
    640640        $expected = '<p>Look at this code</p>' . "\n<pre>" . $code . "</pre>\n" . '<p>Isn\'t that cool?</p>'; 
    641641        $this->assertEquals( $expected, trim( wpautop( $str ) ) ); 
     642 
     643        // Make sure HTML breaks are maintained if manually inserted 
     644        $str = "Look at this code\n\n<pre>Line1<br />Line2<br>Line3<br/>Line4\nActual Line 2\nActual Line 3</pre>\n\nCool, huh?"; 
     645        $expected = "<p>Look at this code</p>\n<pre>Line1<br />Line2<br>Line3<br/>Line4\nActual Line 2\nActual Line 3</pre>\n<p>Cool, huh?</p>"; 
     646        $this->assertEquals( $expected, trim( wpautop( $str ) ) ); 
    642647    } 
    643648     
Note: See TracChangeset for help on using the changeset viewer.