summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/webrick/test_utils.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/webrick/test_utils.rb b/test/webrick/test_utils.rb
index e63e0ebbfd..d7ef3653f7 100644
--- a/test/webrick/test_utils.rb
+++ b/test/webrick/test_utils.rb
@@ -58,7 +58,11 @@ class TestWEBrickUtils < Test::Unit::TestCase
do_test_timeout(WEBrick::Utils)
end
- #def test_timeout
- # do_test_timeout(Timeout)
- #end
+ def test_create_listeners
+ listeners = WEBrick::Utils.create_listeners("127.0.0.1", "9999")
+ srv = listeners.first
+ assert_equal true, srv.is_a?(TCPServer)
+ assert_equal ["AF_INET", 9999, "127.0.0.1", "127.0.0.1"], srv.addr
+ end
+
end