mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-10-05 16:37:25 +00:00
Fix skeleton file creation
This commit is contained in:
@@ -134,7 +134,7 @@ class CMockGenerator
|
|||||||
def create_skeleton_source_file(mock_project)
|
def create_skeleton_source_file(mock_project)
|
||||||
filename = "#{@config.mock_path}/#{@subdir + '/' if @subdir}#{mock_project[:module_name]}.c"
|
filename = "#{@config.mock_path}/#{@subdir + '/' if @subdir}#{mock_project[:module_name]}.c"
|
||||||
existing = File.exist?(filename) ? File.read(filename) : ''
|
existing = File.exist?(filename) ? File.read(filename) : ''
|
||||||
@file_writer.append_file(mock_project[:module_name] + '.c', @subdir) do |file, fullname|
|
@file_writer.create_file(mock_project[:module_name] + '.c', @subdir) do |file, fullname|
|
||||||
blank_project = mock_project.clone
|
blank_project = mock_project.clone
|
||||||
blank_project[:parsed_stuff] = { :functions => [] }
|
blank_project[:parsed_stuff] = { :functions => [] }
|
||||||
create_source_header_section(file, fullname, blank_project) if existing.empty?
|
create_source_header_section(file, fullname, blank_project) if existing.empty?
|
||||||
|
|||||||
Reference in New Issue
Block a user