While working on tests for the forthcoming ./go new command to address #142, I added a new @go.test_compgen helper in lib/testing/environment to replace the use of hand-written while loops to generate @go.compgen test data. In the process, I used set "$BATS_ASSERTION_DISABLE_SHELL_OPTIONS and return_from_bats_assertion to make the function faster than a hand-written loop, and realized that the mechanism could be applied to all Bats helper functions, potentially shaving a substantial amount of time off of the total build.
After merging the forthcoming PRs for @go.test_compgen and ./go new, I'll get to work on another PR to extract lib/bats/function and close this issue.
While working on tests for the forthcoming
./go new
command to address #142, I added a new@go.test_compgen
helper inlib/testing/environment
to replace the use of hand-writtenwhile
loops to generate@go.compgen
test data. In the process, I usedset "$BATS_ASSERTION_DISABLE_SHELL_OPTIONS
andreturn_from_bats_assertion
to make the function faster than a hand-written loop, and realized that the mechanism could be applied to all Bats helper functions, potentially shaving a substantial amount of time off of the total build.After merging the forthcoming PRs for
@go.test_compgen
and./go new
, I'll get to work on another PR to extractlib/bats/function
and close this issue.