Skip to content

Commit

Permalink
🪲 Fixed issue where -oblah.yml isn't parsed by powershell.
Browse files Browse the repository at this point in the history
:fern: `-o blah.yml` also accepted as valid input now.
  • Loading branch information
mvandervoord committed Mar 20, 2024
1 parent 0240b4a commit 3a6f1f2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CMock ![CI](https://github.com/ThrowTheSwitch/CMock/workflows/CI/badge.svg)
=====

CMock is a mock and stub generator and runtime for unit testing C. It's been designed
to work smoothly with Unity Test, another of the embedded-software testing tools
developed by ThrowTheSwitch.org. CMock automagically parses your C headers and creates
Expand All @@ -12,22 +13,28 @@ a test-centered build manager for unit testing C code.
- [Change Log](docs/CMockChangeLog.md)

Getting Started
================
===============

If you're using Ceedling, there is no need to install CMock. It will handle it for you.
For everyone else, the simplest way is to grab it off github. You can also download it
as a zip if you prefer. The Github method looks something like this:

> git clone --recursive https://github.com/throwtheswitch/cmock.git
> cd cmock
> bundle install # Ensures you have all RubyGems needed

Contributing to this Project
============================

If you plan to help with the development of CMock (or just want to verify that it can
perform its self tests on your system) then you can enter the test directory and then
ask it to test:
perform its self tests on your system) then you can grab its self-testing dependencies,
then run its self-tests:

> cd cmock
> bundle install # Ensures you have all RubyGems needed
> cd test
> rake # Run all CMock self tests
> rake # Run all CMock self tests

Before working on this project, you're going to want to read our guidelines on
[contributing](docs/CONTRIBUTING.md).

API Documentation
=================
Expand Down
10 changes: 9 additions & 1 deletion lib/cmock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,13 @@ def option_maker(options, key, val)

options = {}
filelist = []
opt_flag = false
ARGV.each do |arg|
case arg
when /^-o"?([a-zA-Z0-9@._\\\/:\s]+)"?/
options.merge! CMockConfig.load_config_file_from_yaml(arg.gsub(/^-o/, ''))
when /^-o$/
opt_flag = true
when '--skeleton'
options[:skeleton] = true
when /^--strippables="?(.*)"?/
Expand All @@ -100,7 +103,12 @@ def option_maker(options, key, val)
options = option_maker(options, Regexp.last_match(1),
Regexp.last_match(2))
else
filelist << arg
if opt_flag
options.merge! CMockConfig.load_config_file_from_yaml(arg)
opt_flag = false
else
filelist << arg
end
end
end

Expand Down

0 comments on commit 3a6f1f2

Please sign in to comment.