Clojure

pprint tests fail on Windows, expecting \n

Details

  • 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:
    Ok

Description

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 https://github.com/clojure/clojure/commit/4ca0f7ea17888ba7ed56d2fde0bc2d6397e8e1c0

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

Activity

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: