Adjust test.c for automated testing
Added further testing automation