[PATCH v2 07/18] tests: Add function to test the ouput of a bash function