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: Closed Closed
    • Priority: Minor Minor
    • Resolution: Incomplete
    • 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

        Hide
        Charles Oliver Nutter added a comment -

        JRuby has moved bug tracking to Github, accessible via our Github page at https://github.com/jruby/jruby/issues, or via http://bugs.jruby.org. In addition, this bug has not been updated in over two years.

        We have decided to close down these old JIRA issues.

        If your report is still a problem on current JRuby versions (1.7.18 or master/9.0.0.0), please re-file the bug at http://bugs.jruby.org.

        You can contact us on the JRuby mailing lists, Freenode IRC channel #jruby, or the @jruby Twitter account if you are unsure how to proceed.

        Show
        Charles Oliver Nutter added a comment - JRuby has moved bug tracking to Github, accessible via our Github page at https://github.com/jruby/jruby/issues , or via http://bugs.jruby.org . In addition, this bug has not been updated in over two years. We have decided to close down these old JIRA issues. If your report is still a problem on current JRuby versions (1.7.18 or master/9.0.0.0), please re-file the bug at http://bugs.jruby.org . You can contact us on the JRuby mailing lists, Freenode IRC channel #jruby, or the @jruby Twitter account if you are unsure how to proceed.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: