diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | test/webrick/test_filehandler.rb | 5 |
2 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Tue Mar 29 10:28:08 2011 NAKAMURA Usaku <usa@ruby-lang.org> + + * test/webrick/test_filehandler.rb + (WEBrick::TestFileHandler#test_short_filename): the cgi doesn't exist + on current directory. + Tue Mar 29 05:19:57 2011 Tanaka Akira <akr@fsij.org> * ext/socket/raddrinfo.c: parenthesize macro arguments. 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 |