diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-15 03:07:37 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-07-15 03:07:37 +0000 |
commit | 6361928083d01906ab9d8782b6533b4ed7c834a0 (patch) | |
tree | 172488be8a74c9313d35b9cd7d53999cd55f561d /test/rake/test_rake_application_options.rb | |
parent | 031e1570b934d6b3a1e17ae8eb78a44dac8186d3 (diff) | |
download | ruby-6361928083d01906ab9d8782b6533b4ed7c834a0.tar.gz |
* lib/rake.rb, lib/rake/*.rb: Upgrade to rake-10.3.2
[fix GH-668]
* test/rake/*.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rake/test_rake_application_options.rb')
-rw-r--r-- | test/rake/test_rake_application_options.rb | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/test/rake/test_rake_application_options.rb b/test/rake/test_rake_application_options.rb index b3220b8a97..a9ae4d9c00 100644 --- a/test/rake/test_rake_application_options.rb +++ b/test/rake/test_rake_application_options.rb @@ -111,14 +111,23 @@ class TestRakeApplicationOptions < Rake::TestCase end def test_jobs + flags([]) do |opts| + assert_nil opts.thread_pool_size + end + flags(['--jobs', '0'], ['-j', '0']) do |opts| + assert_equal 0, opts.thread_pool_size + end + flags(['--jobs', '1'], ['-j', '1']) do |opts| + assert_equal 0, opts.thread_pool_size + end flags(['--jobs', '4'], ['-j', '4']) do |opts| - assert_equal 4, opts.thread_pool_size + assert_equal 3, opts.thread_pool_size end flags(['--jobs', 'asdas'], ['-j', 'asdas']) do |opts| - assert_equal 2, opts.thread_pool_size + assert_equal Rake.suggested_thread_count-1, opts.thread_pool_size end flags('--jobs', '-j') do |opts| - assert_equal 2, opts.thread_pool_size + assert opts.thread_pool_size > 1_000_000, "thread pool size should be huge (was #{opts.thread_pool_size})" end end @@ -449,7 +458,7 @@ class TestRakeApplicationOptions < Rake::TestCase end @app.instance_eval do handle_options - collect_tasks + collect_command_line_tasks end @tasks = @app.top_level_tasks @app.options |