From d084c4f43d975f1f9b3f7bf12a46506dbbea2a2d Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 29 Mar 2011 01:29:20 +0000 Subject: * test/webrick/test_filehandler.rb (WEBrick::TestFileHandler#test_short_filename): the cgi doesn't exist on current directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/webrick/test_filehandler.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/webrick') diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb index fdb2d8a7e2..bcdb3dfed0 100644 --- a/test/webrick/test_filehandler.rb +++ b/test/webrick/test_filehandler.rb @@ -217,7 +217,10 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase TestWEBrick.start_httpserver(config) do |server, addr, port, log| http = Net::HTTP.new(addr, port) if windows? - fname = IO.popen("dir /x webrick_long_filename.cgi", "r").read.match(/\s(w.+?cgi)\s/i)[1].downcase + fname = nil + Dir.chdir(config[:DocumentRoot]) do + fname = IO.popen("dir /x webrick_long_filename.cgi", "r").read.match(/\s(w.+?cgi)\s/i)[1].downcase + end else fname = "webric~1.cgi" end -- cgit v1.2.3