summaryrefslogtreecommitdiff
path: root/test/webrick
diff options
context:
space:
mode:
authorarton <arton@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-28 16:52:20 +0000
committerarton <arton@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-28 16:52:20 +0000
commit5988d8cbd5be141ccb9e6516785dae6be80c724e (patch)
treedde4ddaf002f4d65aaa67b2f2e1ed1e51e6fd23c /test/webrick
parentf2b3d517871b2c6d5db610d2084afedc2e2e7cab (diff)
* test/webrick/test_filehandler.rb (test_short_filename):
read real short filename by cmd because smb mounted files have different naming convention. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/webrick')
-rw-r--r--test/webrick/test_filehandler.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb
index e4b672a..fdb2d8a 100644
--- a/test/webrick/test_filehandler.rb
+++ b/test/webrick/test_filehandler.rb
@@ -216,8 +216,12 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
}
TestWEBrick.start_httpserver(config) do |server, addr, port, log|
http = Net::HTTP.new(addr, port)
-
- req = Net::HTTP::Get.new("/webric~1.cgi/test")
+ if windows?
+ fname = IO.popen("dir /x webrick_long_filename.cgi", "r").read.match(/\s(w.+?cgi)\s/i)[1].downcase
+ else
+ fname = "webric~1.cgi"
+ end
+ req = Net::HTTP::Get.new("/#{fname}/test")
http.request(req) do |res|
if windows?
assert_equal("200", res.code, log.call)