aboutsummaryrefslogtreecommitdiffstats
path: root/test/rake/test_rake_application_options.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-29 19:16:46 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-29 19:16:46 +0000
commitd1d4490a57413ff5cb7e8bd0274bb34c7da68d29 (patch)
tree70596346a7f5f13d846cda7353fb8474baf4ad7e /test/rake/test_rake_application_options.rb
parent40bae2f67c1160e1e59018c1003d014c60d1ee47 (diff)
downloadruby-d1d4490a57413ff5cb7e8bd0274bb34c7da68d29.tar.gz
* lib/rake/*: Updated to rake 0.9.5
* test/rake/*: ditto. * NEWS: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rake/test_rake_application_options.rb')
-rw-r--r--test/rake/test_rake_application_options.rb25
1 files changed, 20 insertions, 5 deletions
diff --git a/test/rake/test_rake_application_options.rb b/test/rake/test_rake_application_options.rb
index 004b8ef3ac..6a8aba652b 100644
--- a/test/rake/test_rake_application_options.rb
+++ b/test/rake/test_rake_application_options.rb
@@ -228,7 +228,7 @@ class TestRakeApplicationOptions < Rake::TestCase
end
def test_trace_with_stdout
- flags('--trace=stdout', '-tstdout', '-t stdout') do |opts|
+ flags('--trace=stdout', '-tstdout') do |opts|
assert opts.trace, "should enable trace option"
assert opts.backtrace, "should enabled backtrace option"
assert_equal $stdout, opts.trace_output
@@ -238,7 +238,7 @@ class TestRakeApplicationOptions < Rake::TestCase
end
def test_trace_with_stderr
- flags('--trace=stderr', '-tstderr', '-t stderr') do |opts|
+ flags('--trace=stderr', '-tstderr') do |opts|
assert opts.trace, "should enable trace option"
assert opts.backtrace, "should enabled backtrace option"
assert_equal $stderr, opts.trace_output
@@ -254,13 +254,21 @@ class TestRakeApplicationOptions < Rake::TestCase
assert_match(/un(known|recognized).*\btrace\b.*xyzzy/i, ex.message)
end
+ def test_trace_with_following_task_name
+ flags(['--trace', 'taskname'], ['-t', 'taskname']) do |opts|
+ assert opts.trace, "should enable trace option"
+ assert opts.backtrace, "should enabled backtrace option"
+ assert_equal $stderr, opts.trace_output
+ assert Rake::FileUtilsExt.verbose_flag
+ assert_equal ['taskname'], @app.top_level_tasks
+ end
+ end
def test_backtrace
flags('--backtrace') do |opts|
assert opts.backtrace, "should enable backtrace option"
assert_equal $stderr, opts.trace_output
assert ! opts.trace, "should not enable trace option"
- assert ! Rake::FileUtilsExt.verbose_flag
end
end
@@ -269,7 +277,6 @@ class TestRakeApplicationOptions < Rake::TestCase
assert opts.backtrace, "should enable backtrace option"
assert_equal $stdout, opts.trace_output
assert ! opts.trace, "should not enable trace option"
- assert ! Rake::FileUtilsExt.verbose_flag
end
end
@@ -278,7 +285,6 @@ class TestRakeApplicationOptions < Rake::TestCase
assert opts.backtrace, "should enable backtrace option"
assert_equal $stderr, opts.trace_output
assert ! opts.trace, "should not enable trace option"
- assert ! Rake::FileUtilsExt.verbose_flag
end
end
@@ -289,6 +295,15 @@ class TestRakeApplicationOptions < Rake::TestCase
assert_match(/un(known|recognized).*\bbacktrace\b.*xyzzy/i, ex.message)
end
+ def test_backtrace_with_following_task_name
+ flags(['--backtrace', 'taskname']) do |opts|
+ assert ! opts.trace, "should enable trace option"
+ assert opts.backtrace, "should enabled backtrace option"
+ assert_equal $stderr, opts.trace_output
+ assert_equal ['taskname'], @app.top_level_tasks
+ end
+ end
+
def test_trace_rules
flags('--rules') do |opts|
assert opts.trace_rules