dreamteamrepos / bashellite

Like another repository manager you may know, but with the ability to sync more than just rpm mirrors.
MIT License
2 stars 5 forks source link

Bashellite lacks proper unit testing #23

Open codrcodz opened 6 years ago

codrcodz commented 6 years ago

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.

codrcodz commented 6 years ago

The util-libs now have near 100% code coverage thanks to #40 Still need to do the same thing for bashellite-libs.