JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-4895

test/test_file/test_file_url fails due to windows linebreak handling

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Windows
    • Labels:
      None
    • Number of attachments :
      0

      Description

      File read contents via File.read(path) and File.read("file:///#

      {path}

      ") different. First version strips the \r from windows linebreaks, second do not.

      [junit]
      [junit] Testcase: test_file(org.jruby.test.TestUnitTestSuite$ScriptTest): FAILED
      [junit] Faults encountered running test\test_file, complete output follows:
      [junit] Failure:
      [junit] test_file_url(TestFile) [./test/test_file.rb:952]:
      [junit] <"# coding: utf-8 \nrequire 'test/unit'\nrequire 'rbconfig'\nrequire 'fileutils'\nrequire 'tempfile'"> expected but was
      [junit] <"# coding: utf-8 \r\nrequire 'test/unit'\r\nrequire 'rbconfig'\r\nrequire 'fileutils'\r\nrequire 'tempf">.
      [junit]
      [junit] junit.framework.AssertionFailedError: Faults encountered running test\test_file, complete output follows:
      [junit] Failure:
      [junit] test_file_url(TestFile) [./test/test_file.rb:952]:
      [junit] <"# coding: utf-8 \nrequire 'test/unit'\nrequire 'rbconfig'\nrequire 'fileutils'\nrequire 'tempfile'"> expected but was
      [junit] <"# coding: utf-8 \r\nrequire 'test/unit'\r\nrequire 'rbconfig'\r\nrequire 'fileutils'\r\nrequire 'tempf">.
      [junit]
      [junit] at org.jruby.test.TestUnitTestSuite$ScriptTest.runTest(TestUnitTestSuite.java:224)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Lars Westergren
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: