summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-23 09:44:05 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-23 09:44:05 +0000
commit2f50fc74d58085ef3a711410371a080a96340453 (patch)
tree23289c850abfc8c7a6bf0c733e14b448e6a338b3 /test
parent24d7cecd096f7f0c33e023fb25bdc2e347683cca (diff)
backported r26281 from ruby_1_8
* lib/webrick/accesslog.rb (WEBrick::AccessLog.format): log parameter embedding did not work. See #4913. * test/webrick/test_accesslog.rb: Add for test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@32209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/webrick/test_accesslog.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/webrick/test_accesslog.rb b/test/webrick/test_accesslog.rb
new file mode 100644
index 0000000000..15f0a9136b
--- /dev/null
+++ b/test/webrick/test_accesslog.rb
@@ -0,0 +1,10 @@
+require "test/unit"
+require "webrick/accesslog"
+
+class TestWEBrickAccessLog < Test::Unit::TestCase
+ def test_format
+ format = "%{Referer}i and %{User-agent}i"
+ params = {"i" => {"Referer" => "ref", "User-agent" => "agent"}}
+ assert_equal("ref and agent", WEBrick::AccessLog.format(format, params))
+ end
+end