diff --git a/test.sh b/test.sh index 0393ca9..db44f5f 100755 --- a/test.sh +++ b/test.sh @@ -50,11 +50,14 @@ function usage (){ msg "\t**:**\n\n" } -echo " Hououuuu ${PWD}" +msg "**ADSILLH Bash return code test**\n" process_args $@ +[[ -z $COMMAND || -z $TEST_FILE ]] && error "You must specity a command and a test file" msg "Test $COMMAND script with $TEST_FILE\n\n" cd $DIR +[ ! -f $COMMAND ] && error "script **$COMMAND** not found" + while IFS='' read -r i || [[ -n "$line" ]]; do args=$(echo $i | cut -d: -f1) e_code=$(echo $i | cut -d: -f2)