mirror of
https://github.com/ThrowTheSwitch/CMock
synced 2025-03-12 16:51:11 -04:00
26 lines
950 B
Ruby
26 lines
950 B
Ruby
# =========================================================================
|
|
# CMock - Automatic Mock Generation for C
|
|
# ThrowTheSwitch.org
|
|
# Copyright (c) 2007-25 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
|
# SPDX-License-Identifier: MIT
|
|
# =========================================================================
|
|
|
|
if $0 == __FILE__
|
|
|
|
# make sure there is at least one parameter left (the input file)
|
|
if ARGV.length < 2
|
|
puts ["\nusage: ruby #{__FILE__} input_test_file (output)",
|
|
'',
|
|
' input_test_file - this is the C file you want to create a runner for',
|
|
' output - this is the name of the runner file to generate',
|
|
' defaults to (input_test_file)_Runner'].join("\n")
|
|
exit 1
|
|
end
|
|
|
|
require "#{ENV['UNITY_DIR']}/auto/generate_test_runner"
|
|
|
|
test = ARGV[0]
|
|
runner = ARGV[1]
|
|
UnityTestRunnerGenerator.new.run(test, runner)
|
|
end
|