Add test.sh and fixed bug in Makefile