diff --git a/examples/make_example/Makefile b/examples/make_example/Makefile index a0fe532..329f790 100644 --- a/examples/make_example/Makefile +++ b/examples/make_example/Makefile @@ -23,7 +23,7 @@ ${BUILD_DIR}/main: ${SRC_DIR}/main.c ${SRC_DIR}/foo.c ${CC} $< -o $@ run: - ./build/main || true + ./build/main test: setup diff --git a/examples/make_example/test/test_foo.c b/examples/make_example/test/test_foo.c index 80f17f3..3531e68 100644 --- a/examples/make_example/test/test_foo.c +++ b/examples/make_example/test/test_foo.c @@ -13,5 +13,5 @@ void test_foo_init_should_initialize_multiplier() { foo_init(); - TEST_ASSERT_FALSE(1); + TEST_ASSERT_FALSE(0); } diff --git a/examples/temp_sensor/rakefile_helper.rb b/examples/temp_sensor/rakefile_helper.rb index 5a9735b..4d9bd50 100644 --- a/examples/temp_sensor/rakefile_helper.rb +++ b/examples/temp_sensor/rakefile_helper.rb @@ -236,7 +236,7 @@ module RakefileHelpers else "#{simulator[:command]} #{simulator[:pre_support]} #{executable} #{simulator[:post_support]}" end - output = execute(cmd_str, true, true) + output = execute(cmd_str, true) test_results = $cfg['compiler']['build_path'] + test_base test_results += if output.match(/OK$/m).nil? '.testfail' diff --git a/lib/cmock.rb b/lib/cmock.rb index 36b9e05..0f6a950 100644 --- a/lib/cmock.rb +++ b/lib/cmock.rb @@ -99,7 +99,7 @@ if $0 == __FILE__ # --strippables are dealt with separately since the user is allowed to # enter any valid regular expression as argument options = option_maker(options, 'strippables', Regexp.last_match(1)) - when /^--([a-zA-Z0-9._\\\/:\s]+)="?([a-zA-Z0-9._\-\\\/:\s;]*)"?/x + when /^--([a-zA-Z0-9._\\\/:\s]+)="?([a-zA-Z0-9._\-\\\/:\s;@#%!$&\(\)\*]*)"?/x options = option_maker(options, Regexp.last_match(1), Regexp.last_match(2)) else diff --git a/test/rakefile b/test/rakefile index fe64f5d..a03daf5 100644 --- a/test/rakefile +++ b/test/rakefile @@ -91,7 +91,7 @@ namespace :test do desc "Test cmock examples" task :examples => [:prep_system_tests] do - run_examples() + run_examples(true) end #individual system tests diff --git a/test/rakefile_helper.rb b/test/rakefile_helper.rb index bbe3eb9..01c9252 100644 --- a/test/rakefile_helper.rb +++ b/test/rakefile_helper.rb @@ -395,7 +395,7 @@ module RakefileHelpers end end - def run_examples() + def run_examples(verbose=false, raise_on_failure=true) report "\n" report "-----------------\n" report "VALIDATE EXAMPLES\n" @@ -404,7 +404,7 @@ module RakefileHelpers "cd #{File.join("..","examples","temp_sensor")} && rake ci" ].each do |cmd| report "Testing '#{cmd}'" - execute(cmd, false) + execute(cmd, verbose, raise_on_failure) end end