stubbed_env.execute_function works for scripts that are libraries of functions. Any scripts that include executable code will be executed twice.
Script:
function another-function(){
echo "a function"
}
function main(){
echo "testing"
another-function
}
main "$@"
When trying to test just another-function you will get output to stdout from main as well.
stubbed_env.execute_function works for scripts that are libraries of functions. Any scripts that include executable code will be executed twice.
Script:
When trying to test just another-function you will get output to stdout from main as well.