Skip to content

Commit f23d8b2

Browse files
authored
Merge pull request #669 from jonhenneberg/master
Fix filename sanitization with command line option
2 parents c40b80a + 6a8e03b commit f23d8b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

auto/generate_test_runner.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def create_main(output, filename, tests, used_mocks)
389389
output.puts(' {')
390390
output.puts(' if (parse_status < 0)')
391391
output.puts(' {')
392-
output.puts(" UnityPrint(\"#{filename.gsub('.c', '')}.\");")
392+
output.puts(" UnityPrint(\"#{filename.gsub('.c', '').gsub(/\\/, '\\\\\\')}.\");")
393393
output.puts(' UNITY_PRINT_EOL();')
394394
tests.each do |test|
395395
if (!@options[:use_param_tests]) || test[:args].nil? || test[:args].empty?

0 commit comments

Comments
 (0)