IOError raised when using Fileutils.cd + backquotes on Windows
--------------------------------------------------------------

                 Key: JRUBY-2244
                 URL: http://jira.codehaus.org/browse/JRUBY-2244
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1RC2
         Environment: Java 1.5 on Windows XP
            Reporter: Matt Fletcher
         Attachments: test_fileutils_cd_and_backquotes.rb

The following test case is raising an error on Windows:

{noformat}
require "test/unit"
require "fileutils"

class FileUtilsCdAndBackquotesTest < Test::Unit::TestCase
  def test_fileutils_cd_and_backquotes
    result = nil
    FileUtils.cd("C:\\") do
      result = `cd`
    end
    assert_equal "C:\\", result.chomp, "wrong result from cd"
  end
end
{noformat}


Here are the results:
{noformat}
Loaded suite test_fileutils_cd_and_backquotes
Started
E
Finished in 0.096 seconds.

  1) Error:
test_fileutils_cd_and_backquotes(FileUtilsCdAndBackquotesTest):
IOError: CreateProcess: cd error=2
    test_fileutils_cd_and_backquotes.rb:7:in `chdir'
    C://jruby-1.1RC2/lib/ruby/1.8/fileutils.rb:121:in `cd'
    test_fileutils_cd_and_backquotes.rb:7:in `test_fileutils_cd_and_backquotes'
    test_fileutils_cd_and_backquotes.rb:7:in `run'

1 tests, 0 assertions, 0 failures, 1 errors

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to