summaryrefslogtreecommitdiff
path: root/test/webrick
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-21 06:15:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-21 06:15:36 +0000
commit0e8fc182e348442476065886aef7c0b20400d87f (patch)
tree4116af82e71a896f63ab9c377a154b924b355eae /test/webrick
parentafc75f2284875dfd2757a17e9c4fafda1edd704c (diff)
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
Diffstat (limited to 'test/webrick')
-rw-r--r--test/webrick/test_filehandler.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb
index 68c2c28..5b96223 100644
--- a/test/webrick/test_filehandler.rb
+++ b/test/webrick/test_filehandler.rb
@@ -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