require 'gem2deb/rake/testtask'

skiplist = File.read("debian/ruby-tests.skip").split
ENV["TESTOPTS"] = skiplist.map { |item| "--ignore-name='#{item}'" }.join(" ")
ENV["TESTOPTS"] += " --ignore-testcase=TestGemPlatform" if RUBY_VERSION < "3.2"

Rake::TestTask.new(:default) do |t|
  t.ruby_opts = %w[-w]
  t.libs << "test"
  t.test_files = FileList["test/**/test_*.rb"]
end
