From b755bc4d0505c7488f15c9b15b4a8a606f9b6164 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 7 Jan 2008 15:32:07 +0000 Subject: add tests. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/test_timeout.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/test_timeout.rb (limited to 'test/test_timeout.rb') diff --git a/test/test_timeout.rb b/test/test_timeout.rb new file mode 100644 index 000000000..dfa863b37 --- /dev/null +++ b/test/test_timeout.rb @@ -0,0 +1,13 @@ +require 'test/unit' +require 'timeout' +require 'thread' + +class TestTimeout < Test::Unit::TestCase + def test_queue + q = Queue.new + assert_raise(Timeout::Error, "[ruby-dev:32935]") { + timeout(0.1) { q.pop } + } + end +end + -- cgit