diff --git a/test_q1.sh b/test_q1.sh index aafde57..f45bb83 100755 --- a/test_q1.sh +++ b/test_q1.sh @@ -47,11 +47,13 @@ echo " Hououuuu ${PWD}" process_args $@ msg "Test $COMMAND script with $TEST_FILE\n\n" +cd $DIR while IFS='' read -r i || [[ -n "$line" ]]; do args=$(echo $i | cut -d: -f1) e_code=$(echo $i | cut -d: -f2) - msg "\nExécution de la command ${COMMAND} avec les paramètres **${args}**\n" - ret=$(${DIR}${COMMAND} $args 2>&1) + msg "\nScript *${COMMAND}*, paramètres **${args}**\n" + ret=$(./$COMMAND $args 2>&1) + if [[ $? == $e_code ]] then msg "green" "\tLe code de retour est celui attendu (${e_code})\n"