Created
December 8, 2011 20:54
-
-
Save klauern/1448533 to your computer and use it in GitHub Desktop.
ant test failure on test_file_url
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| run-junit-interpreted-short: | |
| [echo] compile=OFF, jit.threshold=20, jit.maxsize=1000000000, jit.max=-1, objectspace=false threadpool=false reflection=false version=ruby1_8 | |
| [junit] Testsuite: org.jruby.test.ScriptTestSuite | |
| [junit] Tests run: 32, Failures: 0, Errors: 0, Time elapsed: 13.844 sec | |
| [junit] | |
| [junit] Testsuite: org.jruby.test.JRubyTestSuite | |
| [junit] Tests run: 35, Failures: 1, Errors: 0, Time elapsed: 28.656 sec | |
| [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) | |
| [junit] [./test/test_file.rb:1030:in `test_file_url' | |
| [junit] org/jruby/RubyKernel.java:1939:in `send' | |
| [junit] org/jruby/RubyArray.java:1609:in `each']: | |
| [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) | |
| [junit] [./test/test_file.rb:1030:in `test_file_url' | |
| [junit] org/jruby/RubyKernel.java:1939:in `send' | |
| [junit] org/jruby/RubyArray.java:1609:in `each']: | |
| [junit] <"# -*- coding: utf-8 -*-\nrequire 'test/unit'\nrequire 'rbconfig'\nrequire 'fileutils'\nrequire 'tempfile'"> expected but was | |
| [junit] <"# -*- coding: utf-8 -*-\r\nrequire 't |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # JRUBY-3634: File.read or File.open with a url to a file resource fails with StringIndexOutOfBounds exception | |
| def test_file_url | |
| path = File.expand_path(__FILE__) | |
| expect = File.read(__FILE__)[0..100] | |
| got = File.read("file:///#{path}")[0..100] | |
| assert_equal(expect, got) | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like when reading from
file:///it reads the Windows\r\n, and thepathdoes not.