From 2f50fc74d58085ef3a711410371a080a96340453 Mon Sep 17 00:00:00 2001 From: nahi Date: Thu, 23 Jun 2011 09:44:05 +0000 Subject: 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 --- test/webrick/test_accesslog.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/webrick/test_accesslog.rb (limited to 'test') 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 -- cgit v1.2.3