test_filehandler.rb: fix for non-NTFS

* test/webrick/test_filehandler.rb (test_script_disclosure): Alternate
  Data Stream is available only on NTFS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-06-21 06:15:36 +00:00
Родитель afc75f2284
Коммит 0e8fc182e3
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -266,8 +266,9 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
assert_equal("/test", res.body, log.call)
end
resok = windows?
response_assertion = Proc.new do |res|
if windows?
if resok
assert_equal("200", res.code, log.call)
assert_equal("/test", res.body, log.call)
else
@ -278,6 +279,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
http.request(req, &response_assertion)
req = Net::HTTP::Get.new("/webrick.cgi./test")
http.request(req, &response_assertion)
resok &&= File.exist?(__FILE__+"::$DATA")
req = Net::HTTP::Get.new("/webrick.cgi::$DATA/test")
http.request(req, &response_assertion)
end