Rakefile in rbs-3.5.0.pre.2 vs Rakefile in rbs-3.5.0
- old
+ new
@@ -17,11 +17,11 @@
t.test_files = FileList["test/**/*_test.rb"].reject do |path|
path =~ %r{test/stdlib/}
end
end
-multitask :default => [:test, :stdlib_test, :rubocop, :validate, :test_doc]
+multitask :default => [:test, :stdlib_test, :typecheck_test, :rubocop, :validate, :test_doc]
task :lexer do
sh "re2c -W --no-generation-date -o ext/rbs_extension/lexer.c ext/rbs_extension/lexer.re"
end
@@ -88,9 +88,26 @@
end
sh "#{ruby} -Ilib #{bin}/test_runner.rb #{test_files.join(' ')}"
# TODO: Ractor tests need to be run in a separate process
sh "#{ruby} -Ilib #{bin}/test_runner.rb test/stdlib/Ractor_test.rb"
sh "#{ruby} -Ilib #{bin}/test_runner.rb test/stdlib/Encoding_test.rb"
+end
+
+task :typecheck_test => :compile do
+ FileList["test/typecheck/*"].each do |test|
+ Dir.chdir(test) do
+ expectations = File.join(test, "steep_expectations.yml")
+ if File.exist?(expectations)
+ sh "steep check --with_expectations"
+ else
+ sh "steep check"
+ end
+ end
+ end
+end
+
+task :raap => :compile do
+ sh %q[cat test/raap.txt | egrep -v '^#|^$' | xargs bundle exec raap]
end
task :rubocop do
sh "rubocop --parallel"
end