Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
CMock generates invalid C for headers with dashes in the name #3
When I gave CMock a header file named cmock-bug.h with the contents:
It created this Mockcmock-bug.h:
This mock header file won't compile because of the dashes in the guard macro and function names.
Dashes are pretty common in C file names, particularly in GNU and Gnome source code. This seems like a use case CMock would want to support.
Here's a patch that fixes the issue for me: