pprint tests fail on Windows, expecting \n


  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Completed
  • Affects Version/s: Release 1.5
  • Fix Version/s: Release 1.6
  • Component/s: None
  • Labels:
  • Environment:
    Windows 7
  • Patch:
    Code and Test
  • Approval:


New pprint tests were committed recently, but they fail on Windows because the tests check for \n, while pprint seems to output \r\n. A log with the test failures is attached.

The first failing commit is

Patch: clj-1076-v3.txt

Approach: Before comparing output of pprint against a string in the unit test, split each of those strings into sequences of lines using clojure.string/split-lines, which removes occurrences of the regex #"\r?\n" between lines, and can thus safely be used to compare multiline strings between platforms that use only a newline, and those that use carriage return plus newline.

Screened by: Alex Miller

  1. clj-1076-fix-tests-on-windows-patch-v1.txt
    29/Sep/12 2:27 PM
    3 kB
    Andy Fingerhut
  2. clj-1076-fix-tests-on-windows-patch-v2.txt
    02/Mar/13 2:50 PM
    2 kB
    Andy Fingerhut
  3. clj-1076-v3.txt
    13/Sep/13 9:16 AM
    2 kB
    Andy Fingerhut
  4. pprint_test_failures_01b4cb7156.txt
    26/Sep/12 2:34 AM
    25 kB
    Ivan Kozik



Vote (1)
Watch (2)


  • Created: