[wp-trac] [WordPress Trac] #57718: Account for Windows line endings in `Tests_Formatting_wpAutop::test_skip_block_math_elements()`

WordPress Trac noreply at wordpress.org
Wed Mar 1 15:56:54 UTC 2023


#57718: Account for Windows line endings in
`Tests_Formatting_wpAutop::test_skip_block_math_elements()`
-------------------------------------------------+-------------------------
 Reporter:  davidbaumwald                        |       Owner:
                                                 |  davidbaumwald
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.2
Component:  Build/Test Tools                     |     Version:  trunk
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  good-first-bug has-patch has-unit-   |     Focuses:
  tests commit                                   |
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55445" 55445]:
 {{{
 #!CommitTicketReference repository="" revision="55445"
 Tests: Ignore EOL differences in a `wpautop()` test for `<math>` block
 elements.

 Unix vs. Windows EOL style mismatches can cause misleading failures in
 tests using the heredoc syntax (`<<<`) or multiline strings as the
 expected result.

 This commit resolves a failure when running the test suite on Windows:
 {{{
 1) Tests_Formatting_wpAutop::test_skip_block_math_elements
 Failed asserting that two strings are identical.
 ...
 #Warning: Strings contain different line endings!
 }}}

 Follow-up to [55272].

 Props davidbaumwald, ignatggeorgiev, sakibmd.
 Fixes #57718.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57718#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list