2023-07-17 14:14:16 +01:00
|
|
|
require "rake/testtask"
|
|
|
|
|
2023-07-21 09:34:26 +01:00
|
|
|
HERE = __dir__
|
|
|
|
|
2023-08-10 14:43:34 +01:00
|
|
|
desc "Creates the base :test task"
|
|
|
|
task :test_task_create do
|
|
|
|
Rake::TestTask.new do |t|
|
|
|
|
t.pattern = "test/test_*.rb"
|
|
|
|
end
|
2023-07-17 14:14:16 +01:00
|
|
|
end
|
2023-07-21 09:34:26 +01:00
|
|
|
|
2023-08-10 14:43:34 +01:00
|
|
|
desc "Runs Voicemeeter basic tests"
|
|
|
|
task :test_basic do
|
|
|
|
ENV["KIND"] = "basic"
|
|
|
|
Rake::Task[:test_task_create].invoke and Rake::Task[:test].invoke
|
2023-07-21 09:34:26 +01:00
|
|
|
end
|
2023-08-10 14:43:34 +01:00
|
|
|
desc "Runs Voicemeeter banana tests"
|
|
|
|
task :test_banana do
|
|
|
|
ENV["KIND"] = "banana"
|
|
|
|
Rake::Task[:test_task_create].invoke and Rake::Task[:test].invoke
|
2023-07-21 09:34:26 +01:00
|
|
|
end
|
2023-08-10 14:43:34 +01:00
|
|
|
desc "Runs Voicemeeter potato tests"
|
|
|
|
task :test_potato do
|
|
|
|
ENV["KIND"] = "potato"
|
|
|
|
Rake::Task[:test_task_create].invoke and Rake::Task[:test].invoke
|
|
|
|
end
|
|
|
|
|
|
|
|
task default: :test_potato
|
|
|
|
task basic: :test_basic
|
|
|
|
task banana: :test_banana
|
|
|
|
task potato: :test_potato
|
|
|
|
|
|
|
|
namespace :e do
|
|
|
|
desc "Runs the events example"
|
|
|
|
task :events do
|
|
|
|
filepath = File.join(HERE, "examples", "events", "main.rb")
|
|
|
|
ruby filepath
|
|
|
|
end
|
|
|
|
|
|
|
|
desc "Runs the midi example"
|
|
|
|
task :midi do
|
|
|
|
filepath = File.join(HERE, "examples", "midi", "main.rb")
|
|
|
|
ruby filepath
|
|
|
|
end
|
|
|
|
|
|
|
|
desc "Runs the obs example"
|
|
|
|
task :obs do
|
|
|
|
targetdir = File.join(HERE, "examples", "obs")
|
|
|
|
Dir.chdir(targetdir)
|
|
|
|
ruby File.join(targetdir, "main.rb")
|
|
|
|
end
|
2023-07-21 09:34:26 +01:00
|
|
|
end
|