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 that create_bats_test_script and run need not be called separately.
run_bats_test_suite is a specialized version of run_test_script specifically for generating and running Bats test cases.
run_bats_test_suite_in_isolation is an even more specialized version of run_bats_test_suite to ensure that PATH is restricted to BATS_TEST_BINDIR and the Bats libexec/ directory within the suite. Along with stub_program_in_path and create_forwarding_script, this is useful for testing helper functions whose behavior depends on the available system commands, such as skip_if_... helpers.
Coverage increased (+0.03%) to 94.68% when pulling 0c0536ae092d755f96a0cbc38d8cc4d8e404a85c on run-script-helpers into 736eb125690d53a4de779add306672a2f506bbec on master.
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.