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

Andy Fingerhut made changes -
Field Original Value New Value
Attachment clj-1076-fix-tests-on-windows-patch-v1.txt [ 11531 ]
Andy Fingerhut made changes -
Patch Code and Test [ 10002 ]
Stuart Halloway made changes -
Approval Incomplete [ 10006 ]
Andy Fingerhut made changes -
Andy Fingerhut made changes -
Approval Incomplete [ 10006 ]
Alex Miller made changes -
Approval Triaged [ 10120 ]
Priority Major [ 3 ] Critical [ 2 ]
Alex Miller made changes -
Labels print
Rich Hickey made changes -
Approval Triaged [ 10120 ] Vetted [ 10003 ]
Fix Version/s Release 1.6 [ 10157 ]
Andy Fingerhut made changes -
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
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-fix-tests-on-windows-patch-v2.txt

*Approach*: Before comparing output of pprint against a string in the unit test, remove carriage returns from the pprint output.
Andy Fingerhut made changes -
Attachment clj-1076-v3.txt [ 12258 ]
Andy Fingerhut made changes -
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-fix-tests-on-windows-patch-v2.txt

*Approach*: Before comparing output of pprint against a string in the unit test, remove carriage returns from the pprint output.
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.
Alex Miller made changes -
Approval Vetted [ 10003 ] Screened [ 10004 ]
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.
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
Rich Hickey made changes -
Approval Screened [ 10004 ] Ok [ 10007 ]
Stuart Halloway made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: