mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rake: Update to rake (9237e74), typo fix and remove needless
private syntax. * test/rake: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ca6b174078
commit
b89e894399
8 changed files with 18 additions and 15 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Fri Feb 27 20:55:42 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||||
|
|
||||||
|
* lib/rake: Update to rake (9237e74), typo fix and remove needless
|
||||||
|
private syntax.
|
||||||
|
* test/rake: ditto.
|
||||||
|
|
||||||
Fri Feb 27 17:06:44 2015 Koichi Sasada <ko1@atdot.net>
|
Fri Feb 27 17:06:44 2015 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* vm_core.h: define vm_svar_index.
|
* vm_core.h: define vm_svar_index.
|
||||||
|
|
|
@ -7,7 +7,7 @@ module Rake
|
||||||
# DSL is a module that provides #task, #desc, #namespace, etc. Use this
|
# DSL is a module that provides #task, #desc, #namespace, etc. Use this
|
||||||
# when you'd like to use rake outside the top level scope.
|
# when you'd like to use rake outside the top level scope.
|
||||||
#
|
#
|
||||||
# For a Rakefile you run from the comamnd line this module is automatically
|
# For a Rakefile you run from the command line this module is automatically
|
||||||
# included.
|
# included.
|
||||||
|
|
||||||
module DSL
|
module DSL
|
||||||
|
|
|
@ -291,9 +291,6 @@ module Rake
|
||||||
result.flatten
|
result.flatten
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
# Return the current description, clearing it in the process.
|
# Return the current description, clearing it in the process.
|
||||||
def get_description(task)
|
def get_description(task)
|
||||||
desc = @last_description
|
desc = @last_description
|
||||||
|
|
|
@ -62,7 +62,7 @@ module Rake
|
||||||
#
|
#
|
||||||
attr_accessor :loader
|
attr_accessor :loader
|
||||||
|
|
||||||
# Array of commandline options to pass to ruby when running test loader.
|
# Array of command line options to pass to ruby when running test loader.
|
||||||
attr_accessor :ruby_opts
|
attr_accessor :ruby_opts
|
||||||
|
|
||||||
# Description of the test task. (default is 'Run tests')
|
# Description of the test task. (default is 'Run tests')
|
||||||
|
|
|
@ -198,7 +198,7 @@ class TestRakeApplicationOptions < Rake::TestCase
|
||||||
def test_quiet
|
def test_quiet
|
||||||
Rake::FileUtilsExt.verbose_flag = true
|
Rake::FileUtilsExt.verbose_flag = true
|
||||||
flags('--quiet', '-q') do |opts|
|
flags('--quiet', '-q') do |opts|
|
||||||
assert ! Rake::FileUtilsExt.verbose_flag, "verbose flag shoud be false"
|
assert ! Rake::FileUtilsExt.verbose_flag, "verbose flag should be false"
|
||||||
assert ! opts.silent, "should not be silent"
|
assert ! opts.silent, "should not be silent"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -57,13 +57,13 @@ class TestLinkedList < Rake::TestCase
|
||||||
refute_equal short, list
|
refute_equal short, list
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_converstion_to_string
|
def test_conversion_to_string
|
||||||
list = LinkedList.make(:one, :two, :three)
|
list = LinkedList.make(:one, :two, :three)
|
||||||
assert_equal "LL(one, two, three)", list.to_s
|
assert_equal "LL(one, two, three)", list.to_s
|
||||||
assert_equal "LL()", LinkedList.make().to_s
|
assert_equal "LL()", LinkedList.make().to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_converstion_with_inspect
|
def test_conversion_with_inspect
|
||||||
list = LinkedList.make(:one, :two, :three)
|
list = LinkedList.make(:one, :two, :three)
|
||||||
assert_equal "LL(:one, :two, :three)", list.inspect
|
assert_equal "LL(:one, :two, :three)", list.inspect
|
||||||
assert_equal "LL()", LinkedList.make().inspect
|
assert_equal "LL()", LinkedList.make().inspect
|
||||||
|
|
|
@ -152,11 +152,11 @@ class TestRakePathMap < Rake::TestCase
|
||||||
"Your file extension is '.rb'",
|
"Your file extension is '.rb'",
|
||||||
"dir/abc.rb".pathmap("Your file extension is '%x'"))
|
"dir/abc.rb".pathmap("Your file extension is '%x'"))
|
||||||
assert_equal(
|
assert_equal(
|
||||||
"bin/org/onstepback/proj/A.class",
|
"bin/org/onestepback/proj/A.class",
|
||||||
"src/org/onstepback/proj/A.java".pathmap("%{src,bin}d/%n.class"))
|
"src/org/onestepback/proj/A.java".pathmap("%{src,bin}d/%n.class"))
|
||||||
assert_equal(
|
assert_equal(
|
||||||
"src_work/bin/org/onstepback/proj/A.class",
|
"src_work/bin/org/onestepback/proj/A.class",
|
||||||
"src_work/src/org/onstepback/proj/A.java".
|
"src_work/src/org/onestepback/proj/A.java".
|
||||||
pathmap('%{\bsrc\b,bin}X.class'))
|
pathmap('%{\bsrc\b,bin}X.class'))
|
||||||
assert_equal(
|
assert_equal(
|
||||||
".depends.bak",
|
".depends.bak",
|
||||||
|
|
|
@ -195,14 +195,14 @@ class TestRakeTask < Rake::TestCase
|
||||||
assert_equal ["b", "c"], Task[:a].prerequisites
|
assert_equal ["b", "c"], Task[:a].prerequisites
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_prerequiste_tasks_returns_tasks_not_strings
|
def test_prerequisite_tasks_returns_tasks_not_strings
|
||||||
a = task :a => ["b", "c"]
|
a = task :a => ["b", "c"]
|
||||||
b = task :b
|
b = task :b
|
||||||
c = task :c
|
c = task :c
|
||||||
assert_equal [b, c], a.prerequisite_tasks
|
assert_equal [b, c], a.prerequisite_tasks
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_prerequiste_tasks_fails_if_prerequisites_are_undefined
|
def test_prerequisite_tasks_fails_if_prerequisites_are_undefined
|
||||||
a = task :a => ["b", "c"]
|
a = task :a => ["b", "c"]
|
||||||
task :b
|
task :b
|
||||||
assert_raises(RuntimeError) do
|
assert_raises(RuntimeError) do
|
||||||
|
@ -210,7 +210,7 @@ class TestRakeTask < Rake::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_prerequiste_tasks_honors_namespaces
|
def test_prerequisite_tasks_honors_namespaces
|
||||||
a = b = nil
|
a = b = nil
|
||||||
namespace "X" do
|
namespace "X" do
|
||||||
a = task :a => ["b", "c"]
|
a = task :a => ["b", "c"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue