bats/helpers: Add run
convenience functions
#196
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Also adds
restore_programs_in_path
, which allows a single call to remove multiple command stub scripts.run_test_script
creates and runs a test script in one step, so thatcreate_bats_test_script
andrun
need not be called separately.run_bats_test_suite
is a specialized version ofrun_test_script
specifically for generating and running Bats test cases.run_bats_test_suite_in_isolation
is an even more specialized version ofrun_bats_test_suite
to ensure thatPATH
is restricted toBATS_TEST_BINDIR
and the Batslibexec/
directory within the suite. Along withstub_program_in_path
andcreate_forwarding_script
, this is useful for testing helper functions whose behavior depends on the available system commands, such asskip_if_...
helpers.