summaryrefslogtreecommitdiff
path: root/test/ruby/test_process.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-16 12:55:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-16 12:55:59 +0000
commit9446db408ce9fec8116aa767ce159513558a3638 (patch)
tree087fa0d8b919977bc3b65d033e9c88c4e941c756 /test/ruby/test_process.rb
parentbb1e08e770e6d3c6528e9d5041b52016b94bebd2 (diff)
Refine error message for time interval
* time.c (time_timespec): Time interval value can be zero, not only positive. [ruby-dev:50709] [Bug #15420] From: shuujii (Shuji KOBAYASHI) <shuujii@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_process.rb')
-rw-r--r--test/ruby/test_process.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 816751ec81..6f16ac3062 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -1509,6 +1509,9 @@ class TestProcess < Test::Unit::TestCase
def test_sleep
assert_raise(ArgumentError) { sleep(1, 1) }
+ [-1, -1.0, -1r].each do |sec|
+ assert_raise_with_message(ArgumentError, /not.*negative/) { sleep(sec) }
+ end
end
def test_getpgid