summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-29 01:29:20 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-29 01:29:20 +0000
commitd084c4f43d975f1f9b3f7bf12a46506dbbea2a2d (patch)
tree0bfbb4b085b72c47b26564dc45a22d9b680cd9a6 /test
parentd8ac44fcfcf730535df82a402bd7c97267b56d61 (diff)
* 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
Diffstat (limited to 'test')
-rw-r--r--test/webrick/test_filehandler.rb5
1 files changed, 4 insertions, 1 deletions
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