ThrowTheSwitch / CMock

CMock - Mock/stub generator for C
http://throwtheswitch.org
MIT License
652 stars 269 forks source link

Fixed newline being added to the skeleton file everytime the skeleton generator is invoked. #468

Closed UCSIG closed 3 months ago

UCSIG commented 4 months ago

Every time the skeleton mock generator script cmock.rb is being called with the --skeleton option and a header file, a newline is being added at the end of the generated skeleton file.
I invoke the skeleton generator script every time I run unity tests, which results in lots of added newlines in the skeleton file. This change adds a check whether the last character of the skeleton file is already a newline, and only adds the newline if it isn't already there.

mvandervoord commented 3 months ago

Fixed.