Since bashellite is written using a hybrid of declarative/functional programming paradigms, it lacks the ability to easily integrate and write unit tests.
Proposed solution to correct this is three fold:
1) Rewrite each individual function/subroutine to set local variables only and echo one return value per function. Ensure all code lives in a function. Ensure global variables are limited to read-only constants.
2) Rewrite the main function to store and pipe output from one function to another.
3) Source bash-test or assert.sh and write tests for each isolated function.
Since bashellite is written using a hybrid of declarative/functional programming paradigms, it lacks the ability to easily integrate and write unit tests.
Proposed solution to correct this is three fold: 1) Rewrite each individual function/subroutine to set local variables only and echo one return value per function. Ensure all code lives in a function. Ensure global variables are limited to read-only constants. 2) Rewrite the main function to store and pipe output from one function to another. 3) Source bash-test or assert.sh and write tests for each isolated function.