forked from ruby/irb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
54 lines (46 loc) · 1.34 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
require "bundler/gem_tasks"
require "rake/testtask"
require "rdoc/task"
Rake::TestTask.new(:test) do |t|
t.libs << "test" << "test/lib"
t.libs << "lib"
t.ruby_opts << "-rhelper"
t.test_files = FileList["test/irb/**/test_*.rb"]
end
# To make sure they have been correctly setup for Ruby CI.
desc "Run each irb test file in isolation."
task :test_in_isolation do
failed = false
FileList["test/irb/**/test_*.rb"].each do |test_file|
ENV["TEST"] = test_file
begin
Rake::Task["test"].execute
rescue
failed = true
msg = "Test '#{test_file}' failed when being executed in isolation. Please make sure 'rake test TEST=#{test_file}' passes."
separation_line = '=' * msg.length
puts <<~MSG
#{separation_line}
#{msg}
#{separation_line}
MSG
end
end
fail "Some tests failed when being executed in isolation" if failed
end
Rake::TestTask.new(:test_yamatanooroti) do |t|
t.libs << 'test' << "test/lib"
t.libs << 'lib'
#t.loader = :direct
t.ruby_opts << "-rhelper"
t.pattern = 'test/irb/yamatanooroti/test_*.rb'
end
task :default => :test
RDoc::Task.new do |rdoc|
rdoc.title = "IRB"
rdoc.rdoc_files.include("*.md", "lib/**/*.rb")
rdoc.rdoc_files.exclude("lib/irb/xmp.rb")
rdoc.rdoc_dir = "docs"
rdoc.main = "README.md"
rdoc.options.push("--copy-files", "LICENSE.txt")
end