mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-29 19:24:27 +01:00
add strict match option as '-n' again.
fix style while I'm at it.
This commit is contained in:
@@ -160,7 +160,7 @@ class UnityModuleGenerator
|
||||
boilerplate: cfg[:boilerplate],
|
||||
includes: case (cfg[:inc])
|
||||
when :src then (@options[:includes][:src] || []) | (pattern_traits[:inc].map { |f| format(f, module_name) })
|
||||
when :inc then (@options[:includes][:inc] || [])
|
||||
when :inc then @options[:includes][:inc] || []
|
||||
when :tst then (@options[:includes][:tst] || []) | (pattern_traits[:inc].map { |f| format("#{@options[:mock_prefix]}#{f}", module_name) })
|
||||
end
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ class UnityTestRunnerGenerator
|
||||
arg_elements_regex = /\s*(#{single_arg_regex_string})\s*,\s*/m
|
||||
|
||||
args += type_and_args[i + 1].scan(args_regex).flatten.map do |arg_values_str|
|
||||
("#{arg_values_str},").scan(arg_elements_regex)
|
||||
"#{arg_values_str},".scan(arg_elements_regex)
|
||||
end.reduce do |result, arg_range_expanded|
|
||||
result.product(arg_range_expanded)
|
||||
end.map do |arg_combinations|
|
||||
@@ -240,8 +240,8 @@ class UnityTestRunnerGenerator
|
||||
output.puts('#include "cmock.h"') unless mocks.empty?
|
||||
output.puts('}') if @options[:externcincludes]
|
||||
if @options[:defines] && !@options[:defines].empty?
|
||||
output.puts("/* injected defines for unity settings, etc */")
|
||||
@options[:defines].each do |d|
|
||||
output.puts('/* injected defines for unity settings, etc */')
|
||||
@options[:defines].each do |d|
|
||||
def_only = d.match(/(\w+).*/)[1]
|
||||
output.puts("#ifndef #{def_only}\n#define #{d}\n#endif /* #{def_only} */")
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/ruby
|
||||
# =========================================================================
|
||||
# Unity - A Test Framework for C
|
||||
# ThrowTheSwitch.org
|
||||
@@ -5,17 +6,11 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# =========================================================================
|
||||
|
||||
#!/usr/bin/ruby
|
||||
#
|
||||
# unity_to_junit.rb
|
||||
#
|
||||
require 'fileutils'
|
||||
require 'optparse'
|
||||
require 'ostruct'
|
||||
require 'set'
|
||||
|
||||
require 'pp'
|
||||
|
||||
VERSION = 1.0
|
||||
|
||||
class ArgvParser
|
||||
|
||||
Reference in New Issue
Block a user