| 1 | if $0 == __FILE__ |
| 2 | |
| 3 | # make sure there is at least one parameter left (the input file) |
| 4 | if ARGV.length < 2 |
| 5 | puts ["\nusage: ruby #{__FILE__} input_test_file (output)", |
| 6 | '', |
| 7 | ' input_test_file - this is the C file you want to create a runner for', |
| 8 | ' output - this is the name of the runner file to generate', |
| 9 | ' defaults to (input_test_file)_Runner'].join("\n") |
| 10 | exit 1 |
| 11 | end |
| 12 | |
| 13 | require "#{ENV['UNITY_DIR']}/auto/generate_test_runner" |
| 14 | |
| 15 | test = ARGV[0] |
| 16 | runner = ARGV[1] |
| 17 | UnityTestRunnerGenerator.new.run(test, runner) |
| 18 | end |