1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_sleep.rb (TestSleep#test_sleep_5sec): syntax error.

* test/ruby/test_sleep.rb (TestSleep#test_sleep_5sec): call uname
  only on linux because it's a workaround for linux only.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2012-03-05 07:51:31 +00:00
parent bfba60f8fe
commit 842c6f605b
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,10 @@
Mon Mar 5 16:50:22 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_sleep.rb (TestSleep#test_sleep_5sec): syntax error.
* test/ruby/test_sleep.rb (TestSleep#test_sleep_5sec): call uname
only on linux because it's a workaround for linux only.
Mon Mar 5 12:44:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org> Mon Mar 5 12:44:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* st.c (unpack_entries): chain entries directly. based on a patch * st.c (unpack_entries): chain entries directly. based on a patch

View file

@ -6,7 +6,7 @@ class TestSleep < Test::Unit::TestCase
start = Time.now start = Time.now
sleep 5 sleep 5
slept = Time.now-start slept = Time.now-start
bottom = /Linux ([\d.]+)/ =~ `uname -sr` && ($1.split('.')<=>%w/2 6.18/<1 ? 4.99 : 5.0 bottom = /linux/ =~ RUBY_PLATFORM && /Linux ([\d.]+)/ =~ `uname -sr` && ($1.split('.')<=>%w/2 6.18/)<1 ? 4.99 : 5.0
assert_operator(bottom, :<=, slept) assert_operator(bottom, :<=, slept)
assert_operator(slept, :<=, 6.0, "[ruby-core:18015]: longer than expected") assert_operator(slept, :<=, 6.0, "[ruby-core:18015]: longer than expected")
ensure ensure