Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/ceedling/unity_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ def create_test_runner_additional_args
@not_supported = "\n\t--exclude_test_case"
end
end
print_warning_about_not_enabled_cmdline_args
if ENV['CEEDLING_EXCLUDE_TEST_CASE_NAME'] || ENV['CEEDLING_INCLUDE_TEST_CASE_NAME']
print_warning_about_not_enabled_cmdline_args
end
end

# Return UNITY_USE_COMMAND_LINE_ARGS define required by Unity to
Expand Down
19 changes: 19 additions & 0 deletions spec/spec_system_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,25 @@ def none_of_test_is_executed_if_test_case_name_and_exclude_test_case_name_is_the
end
end

def confirm_if_notification_for_cmdline_args_not_enabled_is_disabled
@c.with_context do
Dir.chdir @proj_name do
FileUtils.cp test_asset_path("example_file.h"), 'src/'
FileUtils.cp test_asset_path("example_file.c"), 'src/'
FileUtils.cp test_asset_path("test_example_file_success.c"), 'test/'

output = `bundle exec ruby -S ceedling test:test_example_file_success 2>&1`

expect($?.exitstatus).to match(0) # Since a test either pass or are ignored, we return success here
expect(output).to match(/TESTED:\s+2/)
expect(output).to match(/PASSED:\s+1/)
expect(output).to match(/FAILED:\s+0/)
expect(output).to match(/IGNORED:\s+1/)
expect(output).not_to match(/please add `:cmdline_args` under :test_runner option/)
end
end
end

def exlcude_test_case_name_filter_works_and_only_one_test_case_is_executed
@c.with_context do
Dir.chdir @proj_name do
Expand Down
1 change: 1 addition & 0 deletions spec/system/deployment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
it { can_run_single_test_with_full_test_case_name_from_test_file_with_success_cmdline_args_are_enabled }
it { can_run_single_test_with_partiall_test_case_name_from_test_file_with_enabled_cmdline_args_success }
it { exlcude_test_case_name_filter_works_and_only_one_test_case_is_executed }
it { confirm_if_notification_for_cmdline_args_not_enabled_is_disabled }
it { none_of_test_is_executed_if_test_case_name_passed_does_not_fit_defined_in_test_file_and_cmdline_args_are_enabled }
it { none_of_test_is_executed_if_test_case_name_and_exclude_test_case_name_is_the_same }
it { run_all_test_when_test_case_name_is_passed_but_cmdline_args_are_disabled_with_success }
Expand Down